--- configure.orig 2012-01-19 07:30:12.000000000 +0100 +++ configure 2017-02-05 11:06:24.109063000 +0100 @@ -2039,12 +2039,6 @@ ac_config_headers="$ac_config_headers include/SDL_config.h" - -cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF - - ac_aux_dir= for ac_dir in $srcdir/build-scripts; do if test -f "$ac_dir/install-sh"; then @@ -3857,7 +3851,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + netbsd* | bsdsunix* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -4209,6 +4203,20 @@ lt_cv_deplibs_check_method=pass_all ;; +bsdsunix*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + lt_cv_deplibs_check_method='file_magic (BSDSUniX)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in @@ -8411,7 +8419,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -9290,6 +9298,22 @@ dynamic_linker=no ;; +bsdsunix*) + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + objformat=elf + fi + version_type=bsdsunix-$objformat + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_version=no + need_lib_prefix=no + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -13304,11 +13328,15 @@ ld_shlibs_CXX=no ;; + bsdsunix-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -14258,7 +14286,7 @@ ;; esac ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -15058,6 +15086,22 @@ shlibpath_var=LD_LIBRARY_PATH ;; +bsdsunix*) + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + objformat=elf + fi + version_type=bsdsunix-$objformat + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_version=no + need_lib_prefix=no + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd1*) dynamic_linker=no ;; @@ -15826,7 +15870,7 @@ BASE_LDFLAGS="-mno-cygwin" ;; *) - BASE_CFLAGS="-D_GNU_SOURCE=1" + BASE_CFLAGS="" BASE_LDFLAGS="" ;; esac @@ -26934,6 +26978,10 @@ # causes Carbon.p complaints? # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" ;; + *-*-bsdsunix*) + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" + pthread_lib="-pthread" + ;; *-*-freebsd*|*-*-dragonfly*) pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" pthread_lib="-pthread" @@ -29518,7 +29566,7 @@ have_timers=yes fi ;; - *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*) + *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-bsdsunix*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*) case "$host" in *-*-linux*) ARCH=linux ;; *-*-uclinux*) ARCH=linux ;; @@ -29527,6 +29575,7 @@ *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;; *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants *-*-bsdi*) ARCH=bsdi ;; + *-*-bsdsunix*) ARCH=bsdsunix ;; *-*-freebsd*) ARCH=freebsd ;; *-*-dragonfly*) ARCH=freebsd ;; *-*-netbsd*) ARCH=netbsd ;; @@ -29628,6 +29677,14 @@ SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c" have_cdrom=yes ;; + *bsdsunix*) + cat >>confdefs.h <<\_ACEOF +#define SDL_CDROM_BSDSUNIX 1 +_ACEOF + + SOURCES="$SOURCES $srcdir/src/cdrom/bsdsunix/*.c" + have_cdrom=yes + ;; *freebsd*) cat >>confdefs.h <<\_ACEOF #define SDL_CDROM_FREEBSD 1 @@ -30242,7 +30299,7 @@ # Set runtime shared library paths as needed if test "x$enable_rpath" = "xyes"; then - if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then + if test $ARCH = bsdi -o $ARCH = bsdsunix -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}" fi if test $ARCH = solaris; then