configure.in
changeset 1173 e9cf8c1b4590
parent 1170 bb1a52a8d3d6
child 1174 8c43aceeed81
     1.1 --- a/configure.in	Thu Nov 17 03:04:47 2005 +0000
     1.2 +++ b/configure.in	Thu Nov 17 03:15:05 2005 +0000
     1.3 @@ -304,11 +304,11 @@
     1.4              alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
     1.5              echo "-- $alsa_lib_spec -> $alsa_lib"
     1.6  
     1.7 -            if test x$use_dlopen != xyes && \
     1.8 +            if test x$have_loadso != xyes && \
     1.9                 test x$enable_alsa_shared = xyes; then
    1.10 -                AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.11 +                AC_MSG_ERROR([You must have SDL_LoadObject() support])
    1.12              fi
    1.13 -            if test x$use_dlopen = xyes && \
    1.14 +            if test x$have_loadso = xyes && \
    1.15                 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
    1.16                  CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
    1.17                  AC_SUBST(alsa_lib)
    1.18 @@ -367,11 +367,11 @@
    1.19              esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
    1.20              esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
    1.21              echo "-- $esd_lib_spec -> $esd_lib"
    1.22 -            if test x$use_dlopen != xyes && \
    1.23 +            if test x$have_loadso != xyes && \
    1.24                 test x$enable_esd_shared = xyes; then
    1.25 -                AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.26 +                AC_MSG_ERROR([You must have SDL_LoadObject() support])
    1.27              fi
    1.28 -            if test x$use_dlopen = xyes && \
    1.29 +            if test x$have_loadso = xyes && \
    1.30                 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
    1.31                  CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
    1.32                  AC_SUBST(esd_lib)
    1.33 @@ -418,11 +418,11 @@
    1.34                  arts_lib_spec="$ARTSC_PREFIX/lib/libartsc.so.*"
    1.35                  arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
    1.36                  echo "-- $arts_lib_spec -> $arts_lib"
    1.37 -                if test x$use_dlopen != xyes && \
    1.38 +                if test x$have_loadso != xyes && \
    1.39                     test x$enable_arts_shared = xyes; then
    1.40 -                    AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.41 +                    AC_MSG_ERROR([You must have SDL_LoadObject() support])
    1.42                  fi
    1.43 -                if test x$use_dlopen = xyes && \
    1.44 +                if test x$have_loadso = xyes && \
    1.45                     test x$enable_arts_shared = xyes && test x$arts_lib != x; then
    1.46                      CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
    1.47                      AC_SUBST(arts_lib)
    1.48 @@ -617,12 +617,12 @@
    1.49              x11_lib='libX11.so.6'
    1.50              x11ext_lib='libXext.so.6'
    1.51  
    1.52 -            if test x$use_dlopen != xyes && \
    1.53 +            if test x$have_loadso != xyes && \
    1.54                 test x$enable_x11_shared = xyes; then
    1.55 -                AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.56 +                AC_MSG_ERROR([You must have SDL_LoadObject() support])
    1.57              fi
    1.58  
    1.59 -            if test x$use_dlopen = xyes && \
    1.60 +            if test x$have_loadso = xyes && \
    1.61                 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
    1.62                  CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -DX11_DYNAMIC=\$(x11_lib) -DX11EXT_DYNAMIC=\$(x11ext_lib) -I$srcdir/include -I$srcdir/src/video"
    1.63                  SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS"
    1.64 @@ -1131,7 +1131,7 @@
    1.65          AC_MSG_RESULT($video_opengl)
    1.66          if test x$video_opengl = xyes; then
    1.67              CFLAGS="$CFLAGS -DHAVE_OPENGL"
    1.68 -            if test x$use_dlopen != xyes; then
    1.69 +            if test x$have_loadso != xyes; then
    1.70                  AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
    1.71              fi
    1.72          fi
    1.73 @@ -1154,7 +1154,7 @@
    1.74          if test x$video_opengl = xyes; then
    1.75              CFLAGS="$CFLAGS -DHAVE_OPENGL"
    1.76              SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
    1.77 -            if test x$use_dlopen != xyes; then
    1.78 +            if test x$have_loadso != xyes; then
    1.79                  AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS", AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl"))
    1.80              fi
    1.81          fi
    1.82 @@ -1778,16 +1778,16 @@
    1.83                    , enable_sdl_dlopen=yes)
    1.84      if test x$enable_sdl_dlopen = xyes; then
    1.85          AC_MSG_CHECKING(for dlopen)
    1.86 -        use_dlopen=no
    1.87 +        have_loadso=no
    1.88          AC_TRY_COMPILE([
    1.89           #include <dlfcn.h>
    1.90          ],[
    1.91          ],[
    1.92 -        use_dlopen=yes
    1.93 +        have_loadso=yes
    1.94          ])
    1.95 -        AC_MSG_RESULT($use_dlopen)
    1.96 +        AC_MSG_RESULT($have_loadso)
    1.97  
    1.98 -        if test x$use_dlopen = xyes; then
    1.99 +        if test x$have_loadso = xyes; then
   1.100              CFLAGS="$CFLAGS -DUSE_DLOPEN"
   1.101              AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS",
   1.102                 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl",
   1.103 @@ -1806,6 +1806,7 @@
   1.104          AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
   1.105          AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
   1.106          if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
   1.107 +            have_loadso=yes
   1.108              CFLAGS="$CFLAGS -DENABLE_LDG"
   1.109              SYSTEM_LIBS="$SYSTEM_LIBS -lldg -lgem"
   1.110          fi
   1.111 @@ -1989,6 +1990,7 @@
   1.112                    , enable_rpath=yes)
   1.113  }
   1.114  
   1.115 +have_loadso=no
   1.116  case "$target" in
   1.117      arm-*-elf*)
   1.118  	ARCH=linux
   1.119 @@ -2560,6 +2562,7 @@
   1.120          ;;
   1.121      *-*-cygwin* | *-*-mingw32*)
   1.122          ARCH=win32
   1.123 +        have_loadso=yes
   1.124          if test "$build" != "$target"; then # cross-compiling
   1.125              # Default cross-compile location
   1.126              ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
   1.127 @@ -2625,6 +2628,7 @@
   1.128      *-*-beos*)
   1.129          ARCH=beos
   1.130          ac_default_prefix=/boot/develop/tools/gnupro
   1.131 +        have_loadso=yes
   1.132          CheckDummyVideo
   1.133          CheckDiskAudio
   1.134          CheckNASM
   1.135 @@ -2668,6 +2672,7 @@
   1.136          # use it at present, but Apple is working on a X-to-9 compiler
   1.137          # for which this case would be handy.
   1.138          ARCH=macos
   1.139 +        have_loadso=yes
   1.140          CheckDummyVideo
   1.141          CheckDiskAudio
   1.142          CheckTOOLBOX
   1.143 @@ -2711,6 +2716,7 @@
   1.144          # just the OS X kernel sans upper layers like Carbon and Cocoa.
   1.145          # Next line is broken, and a few files below require Mac OS X (full)
   1.146          ARCH=macosx
   1.147 +        have_loadso=yes
   1.148          CheckDummyVideo
   1.149          CheckDiskAudio
   1.150          CheckCOCOA