comparison configure.in @ 4212:0794718a428c SDL-1.2

Fixed bug #591 Wade Berrier 2008-05-28 11:09:42 PDT configure.in will enable dynamic loading by default for modules, but some of the checks only check /lib, /usr/lib, /usr/local/lib, etc... It needs to also account for systems using /lib64, /usr/lib64, and /usr/local/lib64. For example, openSUSE x86_64 distro uses these style paths. Otherwise, i586 gets dynamically loaded, but x86_64 doesn't.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 08:31:15 +0000
parents 453587d6dc87
children c56391324e59
comparison
equal deleted inserted replaced
4211:3ce5bfddbaf6 4212:0794718a428c
285 , enable_assembly=yes) 285 , enable_assembly=yes)
286 if test x$enable_assembly = xyes; then 286 if test x$enable_assembly = xyes; then
287 AC_DEFINE(SDL_ASSEMBLY_ROUTINES) 287 AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
288 fi 288 fi
289 289
290 dnl set this to use on systems that use lib64 instead of lib
291 base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
292
290 dnl See if the OSS audio interface is supported 293 dnl See if the OSS audio interface is supported
291 CheckOSS() 294 CheckOSS()
292 { 295 {
293 AC_ARG_ENABLE(oss, 296 AC_ARG_ENABLE(oss,
294 AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]), 297 AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
346 if test x$have_alsa = xyes; then 349 if test x$have_alsa = xyes; then
347 AC_ARG_ENABLE(alsa-shared, 350 AC_ARG_ENABLE(alsa-shared,
348 AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]), 351 AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
349 , enable_alsa_shared=yes) 352 , enable_alsa_shared=yes)
350 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then 353 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
351 if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then 354 if test "x`ls /$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then
352 ALSA_LIBS="-L/lib $ALSA_LIBS" 355 ALSA_LIBS="-L/$base_libdir $ALSA_LIBS"
353 elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then 356 elif test "x`ls /usr/$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then
354 ALSA_LIBS="-L/usr/lib $ALSA_LIBS" 357 ALSA_LIBS="-L/usr/$base_libdir $ALSA_LIBS"
355 elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then 358 elif test "x`ls /usr/local/$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then
356 ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" 359 ALSA_LIBS="-L/usr/local/$base_libdir $ALSA_LIBS"
357 fi 360 fi
358 fi 361 fi
359 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'` 362 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
360 alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 363 alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
361 echo "-- $alsa_lib_spec -> $alsa_lib" 364 echo "-- $alsa_lib_spec -> $alsa_lib"
499 if test x$audio_pulse = xyes; then 502 if test x$audio_pulse = xyes; then
500 AC_ARG_ENABLE(pulseaudio-shared, 503 AC_ARG_ENABLE(pulseaudio-shared,
501 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]), 504 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
502 , enable_pulse_shared=yes) 505 , enable_pulse_shared=yes)
503 if test "x`echo $PULSE_LIBS | grep -- -L`" = "x"; then 506 if test "x`echo $PULSE_LIBS | grep -- -L`" = "x"; then
504 if test "x`ls /lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then 507 if test "x`ls /$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then
505 PULSE_LIBS="-L/lib $PULSE_LIBS" 508 PULSE_LIBS="-L/$base_libdir $PULSE_LIBS"
506 elif test "x`ls /usr/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then 509 elif test "x`ls /usr/$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then
507 PULSE_LIBS="-L/usr/lib $PULSE_LIBS" 510 PULSE_LIBS="-L/usr/$base_libdir $PULSE_LIBS"
508 elif test "x`ls /usr/local/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then 511 elif test "x`ls /usr/local/$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then
509 PULSE_LIBS="-L/usr/local/lib $PULSE_LIBS" 512 PULSE_LIBS="-L/usr/local/$base_libdir $PULSE_LIBS"
510 fi 513 fi
511 fi 514 fi
512 pulse_lib_spec=`echo $PULSE_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'` 515 pulse_lib_spec=`echo $PULSE_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'`
513 pulse_lib=`ls -- $pulse_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 516 pulse_lib=`ls -- $pulse_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
514 echo "-- $pulse_lib_spec -> $pulse_lib" 517 echo "-- $pulse_lib_spec -> $pulse_lib"
559 AC_MSG_RESULT($audio_arts) 562 AC_MSG_RESULT($audio_arts)
560 if test x$audio_arts = xyes; then 563 if test x$audio_arts = xyes; then
561 AC_ARG_ENABLE(arts-shared, 564 AC_ARG_ENABLE(arts-shared,
562 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]), 565 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
563 , enable_arts_shared=yes) 566 , enable_arts_shared=yes)
564 arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" 567 arts_lib_spec="$ARTS_PREFIX/$base_libdir/libartsc.so.*"
565 arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 568 arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
566 echo "-- $arts_lib_spec -> $arts_lib" 569 echo "-- $arts_lib_spec -> $arts_lib"
567 570
568 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) 571 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
569 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" 572 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
985 x11_lib='libX11.so' 988 x11_lib='libX11.so'
986 x11ext_lib='libXext.so' 989 x11ext_lib='libXext.so'
987 ;; 990 ;;
988 *) 991 *)
989 x11_lib_path=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] 992 x11_lib_path=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
990 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do 993 for path in $x11_lib_path /usr/$base_libdir /usr/X11/$base_libdir /usr/X11R6/$base_libdir; do
991 if test "x$x11_lib" = "x"; then 994 if test "x$x11_lib" = "x"; then
992 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 995 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
993 if test "x$x11_lib" = "x"; then 996 if test "x$x11_lib" = "x"; then
994 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] 997 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
995 fi 998 fi