view release on metacpan or search on metacpan
else {
print "directory '$ENV{SDL_INST_DIR}' does not exist";
}
}
print "no\n";
# sdl-config script
push @candidates, $rv if $rv = check_config_script("sdl-config");
if( $build->can_build_binaries_from_sources || scalar(@candidates) ) {
for(qw(pthread SDL
z jpeg tiff png SDL_image
ogg vorbis vorbisfile SDL_mixer
freetype SDL_ttf
SDL_gfx
pangoft2 pango gobject gmodule glib fontconfig expat SDL_Pango)) {
$have_libs{$_} = check_prereqs_libs($_);
}
}
$perl_libs{pthread} = check_perl_buildlibs('pthread') if $have_libs{pthread} && $^O eq 'openbsd';
# prebuilt binaries (windows only)
push @candidates, @{$rv} if $rv = check_prebuilt_binaries($build->os_type);
if($build->can_build_binaries_from_sources) {
for my $p ( @$source_packs ) {
$rv = { title => $p->{title}, members => [], buildtype => 'build_from_sources' };
for my $m (@{ $p->{members} }) {
next if $m->{pack} !~ /^SDL/ && $have_libs{ $m->{pack} }[0];
my $good = 1;
Versioning rule: public releases are even numbers, dev releases are odd. (same like perl dist)
TODO
- check for available libs when using --with-sdl-config option
1.446 Sat Feb 21 2015
- fix build on OS X Mavericks (missing symbol CGDirectPaletteRef) [FROGGS]
- build fix on Windows Strawberry Perl 5.20.+ [kmx]
1.444 Wed May 14 2014
- check that perl was linked against pthread and do a pthread-less build if not (OpenBSD) [FROGGS]
- add patch that replaces $^ in Makefile.in, which can be a problem for BSD's make [FROGGS]
- let SDL_Pango.h include ft2build.h, because even when the header file ifdef's out some
code that needs it, the source file does not and thus explodes happily. [FROGGS]
- add PIC flags to CFLAGS when the compiler can handle it, this is meant to fix
an issue on freebsd [FROGGS]
1.442 Tue Apr 22 2014
- bump SDL_gfx to 2.0.25 [FROGGS]
- fix for building on >=libX11-1.5.99.901 [FROGGS]
inc/My/Builder.pm view on Meta::CPAN
my $o=`$script --$p 2>$devnull`;
if ($o) {
$o =~ s/[\r\n]*$//;
$o =~ s/\Q$prefix\E/\@PrEfIx\@/g;
$cfg->{$p} = $o;
}
}
if ($^O eq 'openbsd') {
my $osver = `uname -r 2>/dev/null`;
if (!$self->notes('perl_libs')->{pthread} || !$osver || $osver >= 5.0) {
$cfg->{libs} =~ s/\s*-l?pthread//g;
}
}
# write config
$self->config_data('additional_cflags', '-I' . $self->get_path('@PrEfIx@/include') . ' ' .
'-I' . $self->get_path('@PrEfIx@/include/smpeg') . ' ' .
$self->get_additional_cflags);
$self->config_data('additional_libs', $self->get_additional_libs);
$self->config_data('config', $cfg);
}
inc/My/Builder.pm view on Meta::CPAN
# '*SDL*' that did not pass previous test is probably core 'SDL'
$shlib_map{SDL} = $full unless $shlib_map{SDL};
}
};
$cfg->{ld_shared_libs} = [ @shlibs ];
$cfg->{ld_paths} = [ keys %tmp ];
$cfg->{ld_shlib_map} = \%shlib_map;
my $have_libs = $self->notes('have_libs');
for(qw(pthread z jpeg tiff png ogg vorbis vorbisfile freetype
pangoft2 pango gobject gmodule glib fontconfig expat )) {
if( !$shlib_map{$_} && $have_libs->{$_}->[0] ) {
next unless defined $have_libs->{$_}->[1];
if ($_ eq 'pthread' && $^O eq 'openbsd') {
my $osver = `uname -r 2>/dev/null`;
if ($self->notes('perl_libs')->{pthread} || ($osver && $osver < 5.0)) {
push @{ $cfg->{ld_shared_libs} }, $have_libs->{$_}->[1];
$shlib_map{$_} = $have_libs->{$_}->[1];
}
}
else {
push @{ $cfg->{ld_shared_libs} }, $have_libs->{$_}->[1];
$shlib_map{$_} = $have_libs->{$_}->[1];
}
}
}
inc/My/Builder/Unix.pm view on Meta::CPAN
for (keys %$inc_lib_candidates) {
my $ld = $inc_lib_candidates->{$_};
if( -d $_ && -d $ld ) {
$rv{"-L$ld"} = 1;
$rv{"-Wl,-rpath,$ld"} = 1 if $^O =~ /^linux|dragonfly|.+bsd$/;
}
}
push @list, (keys %rv);
if ($^O eq 'openbsd') {
my $osver = `uname -r 2>/dev/null`;
if ($self->notes('perl_libs')->{pthread} || ($osver && $osver < 5.0)) {
push @list, '-lpthread'
}
}
return join(' ', @list);
}
sub can_build_binaries_from_sources {
my $self = shift;
return 1; # yes we can
}
inc/My/Builder/Unix.pm view on Meta::CPAN
if($pack =~ /^SDL_(image|mixer|ttf|gfx|Pango)$/ && $^O eq 'darwin') {
$extra .= ' --disable-sdltest';
}
if($pack eq 'SDL' && $^O eq 'solaris' && !check_header($extra_cflags, 'sys/audioio.h')) {
$extra .= ' --disable-audio';
}
if ($pack eq 'SDL' && $^O eq 'openbsd') {
my $osver = `uname -r 2>/dev/null`;
if (!$self->notes('perl_libs')->{pthread} || !$osver || $osver >= 5.0) {
$extra .= ' --disable-pthreads';
}
}
if($pack =~ /^SDL_/) {
$extra .= " --with-sdl-prefix=$escaped_prefixdir";
}
if($^O eq 'cygwin') {
#$extra_cflags .= " -I/lib/gcc/i686-pc-cygwin/3.4.4/include";
#$extra_ldflags .= " -L/lib/gcc/i686-pc-cygwin/3.4.4";
# $extra_cflags .= " -I/usr/include";
# $extra_ldflags .= " -L/lib";
# $extra_cflags .= " -I/lib/gcc/i686-pc-cygwin/4.3.4/include";
# $extra_ldflags .= " -L/lib/gcc/i686-pc-cygwin/4.3.4";
if($pack eq 'SDL') {
# kmx experienced troubles while cygwin build when nasm was present in PATH
# $extra .= " --disable-nasm --enable-pthreads --enable-pthread-sem --enable-sdl-dlopen --disable-arts"
# . " --disable-esd --disable-nas --enable-oss --disable-pulseaudio --disable-dga --disable-video-aalib"
# . " --disable-video-caca --disable-video-dga --enable-video-dummy --disable-video-ggi --enable-video-opengl"
# . " --enable-video-x11 --disable-video-x11-dgamouse --disable-video-x11-vm --enable-video-x11-xinerama"
# . " --disable-video-x11-xme --enable-video-x11-xrandr --disable-video-x11-xv --disable-arts-shared"
# . " --disable-esd-shared --disable-pulseaudio-shared --enable-x11-shared";
}
}
if($pack eq 'jpeg') {
# otherwise libtiff will complain about invalid version number on dragonflybsd
inc/My/Utility.pm view on Meta::CPAN
# - the order matters, we offer binaries to user in the same order (1st = preffered)
my $prebuilt_binaries = [
{
title => "Binaries Win/32bit SDL-1.2.14 (extended, 20100704) RECOMMENDED\n" .
"\t(gfx, image, mixer, net, smpeg, ttf, sound, svg, rtf, Pango)",
url => [
'http://strawberryperl.com/package/kmx/sdl/Win32_SDL-1.2.14-extended-bin_20100704.zip',
'http://froggs.de/libsdl/Win32_SDL-1.2.14-extended-bin_20100704.zip',
],
sha1sum => '98409ddeb649024a9cc1ab8ccb2ca7e8fe804fd8',
arch_re => qr/^MSWin32-x86-multi-thread(-64int)?$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
},
{
title => "Binaries Win/32bit SDL-1.2.14 (extended, 20111205)\n" .
"\t(gfx, image, mixer, net, smpeg, ttf, sound, svg, rtf, Pango)",
url => [
'http://strawberryperl.com/package/kmx/sdl/Win32_SDL-1.2.14-extended-bin_20111205.zip',
'http://froggs.de/libsdl/Win32_SDL-1.2.14-extended-bin_20111205.zip',
],
sha1sum => '553b7e21bb650d047ec9f2a5f650c67d76430e61',
arch_re => qr/^MSWin32-x86-multi-thread(-64int)?$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
},
{
title => "Binaries Win/64bit SDL-1.2.14 (extended, 20100824)\n" .
"\t(gfx, image, mixer, net, smpeg, ttf, sound, svg, rtf, Pango)\n" .
"\tBEWARE: binaries are using old ABI - will fail with the latest gcc\n" .
"\tBEWARE: this is intended just for old strawberryperl 5.12.x/64bit",
url => [
'http://strawberryperl.com/package/kmx/sdl/Win64_SDL-1.2.14-extended-bin_20100824.zip',
'http://froggs.de/libsdl/Win64_SDL-1.2.14-extended-bin_20100824.zip',
],
sha1sum => 'ccffb7218bcb17544ab00c8a1ae383422fe9586d',
arch_re => qr/^MSWin32-x64-multi-thread$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
gccversion_re => qr/^4\.4\.3$/, #specific to the old gcc compiler used in 64bit strawberryperl 5.12.x
},
{
title => "Binaries Win/64bit SDL-1.2.14 (extended, 20111205) RECOMMENDED\n" .
"\t(gfx, image, mixer, net, smpeg, ttf, sound, svg, rtf, Pango)",
url => [
'http://strawberryperl.com/package/kmx/sdl/Win64_SDL-1.2.14-extended-bin_20111205.zip',
'http://froggs.de/libsdl/Win64_SDL-1.2.14-extended-bin_20111205.zip',
],
sha1sum => '35f3b496ca443a9d14eff77e9e26acfa813afafd',
arch_re => qr/^MSWin32-x64-multi-thread$/,
os_re => qr/^MSWin32$/,
cc_re => qr/gcc/,
gccversion_re => qr/^4\.(4\.[5-9]|[5-9]\.[0-9])$/,
},
{
title => "Binaries Win/32bit SDL-1.2.15 (20120612)\n" .
"\t(gfx, image, mixer, smpeg, ttf)",
url => [
'http://froggs.de/libsdl/Win32_SDL-1.2.15-20120612.zip',
],
inc/My/Utility.pm view on Meta::CPAN
'libsdl-1.2.15-const-xdata32.1.patch',
'libsdl-1.2.15-const-xdata32.2.patch',
'libsdl-1.2.15-const-xdata32.3.patch',
'libsdl-1.2.15-const-xdata32.4.patch',
'SDL-1.2.15-PIC-in-CFLAGS.patch',
'SDL-1.2.15-Makefile.in-OBJECTS.patch',
'SDL-1.2.15-mavericks-cgdirectpallete.patch',
],
prereqs => {
libs => [
'pthread',
]
},
},
{
pack => 'SDL_image',
version => '1.2.11',
dirname => 'SDL_image-1.2.11',
url => [
'http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.11.tar.gz',
'http://froggs.de/libsdl/SDL_image-1.2.11.tar.gz',
patches/SDL-1.2.14-configure view on Meta::CPAN
enable_fast_install
with_gnu_ld
with_sysroot
enable_libtool_lock
enable_libc
enable_audio
enable_video
enable_events
enable_joystick
enable_cdrom
enable_threads
enable_timers
enable_file
enable_loadso
enable_cpuinfo
enable_assembly
enable_oss
enable_alsa
enable_alsa_shared
enable_esd
with_esd_prefix
patches/SDL-1.2.14-configure view on Meta::CPAN
enable_video_picogui
enable_xbios
enable_gem
enable_video_dummy
enable_video_opengl
enable_osmesa_shared
enable_screensaver
enable_input_events
enable_input_tslib
enable_pth
enable_pthreads
enable_pthread_sem
enable_stdio_redirect
enable_directx
enable_sdl_dlopen
enable_atari_ldg
enable_clock_gettime
enable_rpath
'
ac_precious_vars='build_alias
host_alias
target_alias
patches/SDL-1.2.14-configure view on Meta::CPAN
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-libc Use the system C library [[default=yes]]
--enable-audio Enable the audio subsystem [[default=yes]]
--enable-video Enable the video subsystem [[default=yes]]
--enable-events Enable the events subsystem [[default=yes]]
--enable-joystick Enable the joystick subsystem [[default=yes]]
--enable-cdrom Enable the cdrom subsystem [[default=yes]]
--enable-threads Enable the threading subsystem [[default=yes]]
--enable-timers Enable the timer subsystem [[default=yes]]
--enable-file Enable the file subsystem [[default=yes]]
--enable-loadso Enable the shared object loading subsystem
[[default=yes]]
--enable-cpuinfo Enable the cpuinfo subsystem [[default=yes]]
--enable-assembly Enable assembly routines [[default=yes]]
--enable-oss support the OSS audio API [[default=yes]]
--enable-alsa support the ALSA audio API [[default=yes]]
--enable-alsa-shared dynamically load ALSA audio support [[default=yes]]
--enable-esd support the Enlightened Sound Daemon [[default=yes]]
patches/SDL-1.2.14-configure view on Meta::CPAN
--enable-video-dummy use dummy video driver [[default=yes]]
--enable-video-opengl include OpenGL context creation [[default=yes]]
--enable-osmesa-shared dynamically load OSMesa OpenGL support
[[default=yes]]
--enable-screensaver enable screensaver by default while any SDL
application is running [[default=no]]
--enable-input-events use Linux 2.4 unified input interface
[[default=yes]]
--enable-input-tslib use the Touchscreen library for input
[[default=yes]]
--enable-pth use GNU pth library for multi-threading
[[default=yes]]
--enable-pthreads use POSIX threads for multi-threading
[[default=yes]]
--enable-pthread-sem use pthread semaphores [[default=yes]]
--enable-stdio-redirect Redirect STDIO to files on Win32 [[default=yes]]
--enable-directx use DirectX for Win32 audio/video [[default=yes]]
--enable-sdl-dlopen use dlopen for shared object loading [[default=yes]]
--enable-atari-ldg use Atari LDG for shared object loading
[[default=yes]]
--enable-clock_gettime use clock_gettime() instead of gettimeofday() on
UNIX [[default=no]]
--enable-rpath use an rpath when linking SDL [[default=yes]]
Optional Packages:
patches/SDL-1.2.14-configure view on Meta::CPAN
hardcode_libdir_flag_spec_ld=
hardcode_libdir_separator=
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
inherit_rpath=no
link_all_deplibs=unknown
module_cmds=
module_expsym_cmds=
old_archive_from_new_cmds=
old_archive_from_expsyms_cmds=
thread_safe_flag_spec=
whole_archive_flag_spec=
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
patches/SDL-1.2.14-configure view on Meta::CPAN
fi
# Standard C sources
SOURCES="$SOURCES $srcdir/src/*.c"
SOURCES="$SOURCES $srcdir/src/audio/*.c"
SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.c"
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
SOURCES="$SOURCES $srcdir/src/thread/*.c"
SOURCES="$SOURCES $srcdir/src/timer/*.c"
SOURCES="$SOURCES $srcdir/src/video/*.c"
# Check whether --enable-audio was given.
if test "${enable_audio+set}" = set; then :
enableval=$enable_audio;
else
enable_audio=yes
fi
patches/SDL-1.2.14-configure view on Meta::CPAN
if test "${enable_cdrom+set}" = set; then :
enableval=$enable_cdrom;
else
enable_cdrom=yes
fi
if test x$enable_cdrom != xyes; then
$as_echo "#define SDL_CDROM_DISABLED 1" >>confdefs.h
fi
# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then :
enableval=$enable_threads;
else
enable_threads=yes
fi
if test x$enable_threads != xyes; then
$as_echo "#define SDL_THREADS_DISABLED 1" >>confdefs.h
fi
# Check whether --enable-timers was given.
if test "${enable_timers+set}" = set; then :
enableval=$enable_timers;
else
enable_timers=yes
fi
patches/SDL-1.2.14-configure view on Meta::CPAN
CheckPTH()
{
# Check whether --enable-pth was given.
if test "${enable_pth+set}" = set; then :
enableval=$enable_pth;
else
enable_pth=yes
fi
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
# Extract the first word of "pth-config", so it can be a program name with args.
set dummy pth-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PTH_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PTH_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a path.
patches/SDL-1.2.14-configure view on Meta::CPAN
else
use_pth=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pth" >&5
$as_echo_n "checking pth... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_pth" >&5
$as_echo "$use_pth" >&6; }
if test "x$use_pth" = xyes; then
$as_echo "#define SDL_THREAD_PTH 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
have_threads=yes
fi
fi
}
CheckPTHREAD()
{
# Check whether --enable-pthreads was given.
if test "${enable_pthreads+set}" = set; then :
enableval=$enable_pthreads;
else
enable_pthreads=yes
fi
# Check whether --enable-pthread-sem was given.
if test "${enable_pthread_sem+set}" = set; then :
enableval=$enable_pthread_sem;
else
enable_pthread_sem=yes
fi
case "$host" in
*-*-linux*|*-*-uclinux*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread"
;;
*-*-bsdi*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib=""
;;
*-*-darwin*)
pthread_cflags="-D_THREAD_SAFE"
# causes Carbon.p complaints?
# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
;;
*-*-freebsd*|*-*-dragonfly*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-pthread"
;;
*-*-netbsd*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-lpthread"
;;
*-*-openbsd*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-pthread"
;;
*-*-solaris*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread -lposix4"
;;
*-*-sysv5*)
pthread_cflags="-D_REENTRANT -Kthread"
pthread_lib=""
;;
*-*-irix*)
pthread_cflags="-D_SGI_MP_SOURCE"
pthread_lib="-lpthread"
;;
*-*-aix*)
pthread_cflags="-D_REENTRANT -mthreads"
pthread_lib="-lpthread"
;;
*-*-hpux11*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-L/usr/lib -lpthread"
;;
*-*-qnx*)
pthread_cflags=""
pthread_lib=""
;;
*-*-osf*)
pthread_cflags="-D_REENTRANT"
if test x$ac_cv_c_compiler_gnu = xyes; then
pthread_lib="-lpthread -lrt"
else
pthread_lib="-lpthread -lexc -lrt"
fi
;;
*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread"
;;
esac
if test x$enable_threads = xyes -a x$enable_pthreads = xyes -a x$enable_ipod != xyes; then
# Save the original compiler flags and libraries
ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
# Add the pthread compiler flags and libraries
CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
# Check to see if we have pthread support on this system
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthreads" >&5
$as_echo_n "checking for pthreads... " >&6; }
use_pthreads=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
pthread_attr_t type;
pthread_attr_init(&type);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
use_pthreads=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_pthreads" >&5
$as_echo "$use_pthreads" >&6; }
# Restore the compiler flags and libraries
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
# Do futher testing if we have pthread support...
if test x$use_pthreads = xyes; then
$as_echo "#define SDL_THREAD_PTHREAD 1" >>confdefs.h
EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
SDL_LIBS="$SDL_LIBS $pthread_lib"
# Save the original compiler flags and libraries
ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
# Add the pthread compiler flags and libraries
CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
# Check to see if recursive mutexes are available
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recursive mutexes" >&5
$as_echo_n "checking for recursive mutexes... " >&6; }
has_recursive_mutexes=no
if test x$has_recursive_mutexes = xno; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
has_recursive_mutexes=yes
$as_echo "#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test x$has_recursive_mutexes = xno; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
pthread_mutexattr_t attr;
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
has_recursive_mutexes=yes
$as_echo "#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_recursive_mutexes" >&5
$as_echo "$has_recursive_mutexes" >&6; }
# Check to see if pthread semaphore support is missing
if test x$enable_pthread_sem = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread semaphores" >&5
$as_echo_n "checking for pthread semaphores... " >&6; }
have_pthread_sem=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
#include <semaphore.h>
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_pthread_sem=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_sem" >&5
$as_echo "$have_pthread_sem" >&6; }
fi
# Restore the compiler flags and libraries
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
# Basic thread creation functions
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
# Semaphores
# We can fake these with mutexes and condition variables if necessary
if test x$have_pthread_sem = xyes; then
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
else
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
fi
# Mutexes
# We can fake these with semaphores if necessary
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
# Condition variables
# We can fake these with semaphores and mutexes if necessary
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
have_threads=yes
else
CheckPTH
fi
fi
}
CheckWIN32()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Win32 compiler" >&5
$as_echo_n "checking Win32 compiler... " >&6; }
patches/SDL-1.2.14-configure view on Meta::CPAN
have_cdrom=yes
;;
osf)
$as_echo "#define SDL_CDROM_OSF 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
have_cdrom=yes
;;
esac
fi
# Set up files for the thread library
if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
$as_echo "#define SDL_THREAD_SPROC 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
;;
*-*-qnx*)
patches/SDL-1.2.14-configure view on Meta::CPAN
SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
have_joystick=yes
fi
# Set up files for the cdrom library
if test x$enable_cdrom = xyes; then
$as_echo "#define SDL_CDROM_WIN32 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
have_cdrom=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
$as_echo "#define SDL_THREAD_WIN32 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_WIN32 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
patches/SDL-1.2.14-configure view on Meta::CPAN
CheckWIN32
CheckNASM
SOURCES="$SOURCES $srcdir/src/video/gapi/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS -D_WIN32_WCE=0x420"
if test x$enable_audio = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_WAVEOUT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
have_audio=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
$as_echo "#define SDL_THREAD_WIN32 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_WINCE 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/wince/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lmmtimer"
have_timers=yes
fi
# Set up files for the shared object loading library
patches/SDL-1.2.14-configure view on Meta::CPAN
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
have_joystick=yes
fi
# Set up files for the cdrom library
if test x$enable_cdrom = xyes; then
$as_echo "#define SDL_CDROM_BEOS 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
have_cdrom=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
$as_echo "#define SDL_THREAD_BEOS 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_BEOS 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
patches/SDL-1.2.14-configure view on Meta::CPAN
CheckDiskAudio
CheckDummyAudio
CheckAtariBiosEvent
CheckAtariXbiosVideo
CheckAtariGemVideo
CheckAtariAudio
CheckAtariLdg
CheckAtariOSMesa
CheckPTH
# Set up files for the audio library
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
if test x$enable_audio = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_SUNAUDIO 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
have_audio=yes
fi
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_MINT 1" >>confdefs.h
patches/SDL-1.2.14-configure view on Meta::CPAN
fi
# Set up files for the cdrom library
if test x$enable_cdrom = xyes; then
$as_echo "#define SDL_CDROM_MINT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
have_cdrom=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
else
$as_echo "#define SDL_TIMER_MINT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
fi
have_timers=yes
patches/SDL-1.2.14-configure view on Meta::CPAN
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
fi
fi
if test x$have_cdrom != xyes; then
if test x$enable_cdrom = xyes; then
$as_echo "#define SDL_CDROM_DISABLED 1" >>confdefs.h
fi
SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
fi
if test x$have_threads != xyes; then
if test x$enable_threads = xyes; then
$as_echo "#define SDL_THREADS_DISABLED 1" >>confdefs.h
fi
SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
fi
if test x$have_timers != xyes; then
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMERS_DISABLED 1" >>confdefs.h
fi
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
fi
if test x$have_loadso != xyes; then
if test x$enable_loadso = xyes; then
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
precious_files_regex=
prefer_static_libs=no
preload=no
prev=
prevarg=
release=
rpath=
xrpath=
perm_rpath=
temp_rpath=
thread_safe=no
vinfo=
vinfo_number=no
weak_libs=
single_module="${wl}-single_module"
func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
for arg
do
case $arg in
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C and math libraries are in the System framework
func_append deplibs " System.ltframework"
continue
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
test "X$arg" = "X-lc" && continue
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
test "X$arg" = "X-lc" && continue
;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
esac
fi
func_append deplibs " $arg"
continue
;;
-module)
module=yes
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
# classes, name mangling, and exception handling.
# Darwin uses the -arch flag to determine output architecture.
-model|-arch|-isysroot|--sysroot)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
case "$new_inherited_linker_flags " in
*" $arg "*) ;;
* ) func_append new_inherited_linker_flags " $arg" ;;
esac
continue
;;
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
-static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
# would be equivalent was wrong. It would break on at least
# Digital Unix and AIX.
continue
;;
-thread-safe)
thread_safe=yes
continue
;;
-version-info)
prev=vinfo
continue
;;
-version-number)
prev=vinfo
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
if test "$pass" = dlopen; then
# Collect dlpreopened libraries
save_deplibs="$deplibs"
deplibs=
fi
for deplib in $libs; do
lib=
found=no
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
func_append compiler_flags " $deplib"
if test "$linkmode" = lib ; then
case "$new_inherited_linker_flags " in
*" $deplib "*) ;;
* ) func_append new_inherited_linker_flags " $deplib" ;;
esac
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
;;
*)
# Add libc to deplibs on all other systems if necessary.
if test "$build_libtool_need_lc" = "yes"; then
func_append deplibs " -lc"
fi
;;
esac
fi
patches/SDL-1.2.14-ltmain_sh view on Meta::CPAN
else
gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_extract_archives $gentop $convenience
func_append libobjs " $func_extract_archives_result"
test "X$libobjs" = "X " && libobjs=
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
func_append linker_flags " $flag"
fi
# Make a backup of the uninstalled library when relinking
if test "$opt_mode" = relink; then
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
if test "$module" = yes && test -n "$module_cmds" ; then
patches/SDL_config_win32.h view on Meta::CPAN
/* Enable various input drivers */
#ifdef _WIN32_WCE
#define SDL_JOYSTICK_DISABLED 1
#else
#define SDL_JOYSTICK_WINMM 1
#endif
/* Enable various shared object loading systems */
#define SDL_LOADSO_WIN32 1
/* Enable various threading systems */
#define SDL_THREAD_WIN32 1
/* Enable various timer systems */
#ifdef _WIN32_WCE
#define SDL_TIMER_WINCE 1
#else
#define SDL_TIMER_WIN32 1
#endif
/* Enable various video drivers */