Mercurial > sdl-ios-xcode
comparison configure.in @ 3288:8c32cabae4f8
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:02 +0000 |
parents | 1ed5d432e468 |
children | 245a7d79577c |
comparison
equal
deleted
inserted
replaced
3287:77f2f10b81a7 | 3288:8c32cabae4f8 |
---|---|
506 EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS" | 506 EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS" |
507 fi | 507 fi |
508 fi | 508 fi |
509 fi | 509 fi |
510 | 510 |
511 dnl set this to use on systems that use lib64 instead of lib | |
512 base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` | |
513 | |
511 dnl See if the OSS audio interface is supported | 514 dnl See if the OSS audio interface is supported |
512 CheckOSS() | 515 CheckOSS() |
513 { | 516 { |
514 AC_ARG_ENABLE(oss, | 517 AC_ARG_ENABLE(oss, |
515 AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]), | 518 AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]), |
567 if test x$have_alsa = xyes; then | 570 if test x$have_alsa = xyes; then |
568 AC_ARG_ENABLE(alsa-shared, | 571 AC_ARG_ENABLE(alsa-shared, |
569 AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]), | 572 AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]), |
570 , enable_alsa_shared=yes) | 573 , enable_alsa_shared=yes) |
571 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then | 574 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then |
572 if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then | 575 if test "x`ls /$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then |
573 ALSA_LIBS="-L/lib $ALSA_LIBS" | 576 ALSA_LIBS="-L/$base_libdir $ALSA_LIBS" |
574 elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then | 577 elif test "x`ls /usr/$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then |
575 ALSA_LIBS="-L/usr/lib $ALSA_LIBS" | 578 ALSA_LIBS="-L/usr/$base_libdir $ALSA_LIBS" |
576 elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then | 579 elif test "x`ls /usr/local/$base_libdir/libasound.so.* 2> /dev/null`" != "x"; then |
577 ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" | 580 ALSA_LIBS="-L/usr/local/$base_libdir $ALSA_LIBS" |
578 fi | 581 fi |
579 fi | 582 fi |
580 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'` | 583 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'` |
581 alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | 584 alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` |
582 echo "-- $alsa_lib_spec -> $alsa_lib" | 585 echo "-- $alsa_lib_spec -> $alsa_lib" |
720 if test x$audio_pulseaudio = xyes; then | 723 if test x$audio_pulseaudio = xyes; then |
721 AC_ARG_ENABLE(pulseaudio-shared, | 724 AC_ARG_ENABLE(pulseaudio-shared, |
722 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]), | 725 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]), |
723 , enable_pulseaudio_shared=yes) | 726 , enable_pulseaudio_shared=yes) |
724 if test "x`echo $PULSEAUDIO_LIBS | grep -- -L`" = "x"; then | 727 if test "x`echo $PULSEAUDIO_LIBS | grep -- -L`" = "x"; then |
725 if test "x`ls /lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then | 728 if test "x`ls /$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then |
726 PULSEAUDIO_LIBS="-L/lib $PULSEAUDIO_LIBS" | 729 PULSE_LIBS="-L/$base_libdir $PULSE_LIBS" |
727 elif test "x`ls /usr/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then | 730 elif test "x`ls /usr/$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then |
728 PULSEAUDIO_LIBS="-L/usr/lib $PULSEAUDIO_LIBS" | 731 PULSE_LIBS="-L/usr/$base_libdir $PULSE_LIBS" |
729 elif test "x`ls /usr/local/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then | 732 elif test "x`ls /usr/local/$base_libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then |
730 PULSEAUDIO_LIBS="-L/usr/local/lib $PULSEAUDIO_LIBS" | 733 PULSE_LIBS="-L/usr/local/$base_libdir $PULSE_LIBS" |
731 fi | 734 fi |
732 fi | 735 fi |
733 pulseaudio_lib_spec=`echo $PULSEAUDIO_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'` | 736 pulseaudio_lib_spec=`echo $PULSEAUDIO_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'` |
734 pulseaudio_lib=`ls -- $pulseaudio_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | 737 pulseaudio_lib=`ls -- $pulseaudio_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` |
735 echo "-- $pulseaudio_lib_spec -> $pulseaudio_lib" | 738 echo "-- $pulseaudio_lib_spec -> $pulseaudio_lib" |
780 AC_MSG_RESULT($audio_arts) | 783 AC_MSG_RESULT($audio_arts) |
781 if test x$audio_arts = xyes; then | 784 if test x$audio_arts = xyes; then |
782 AC_ARG_ENABLE(arts-shared, | 785 AC_ARG_ENABLE(arts-shared, |
783 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]), | 786 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]), |
784 , enable_arts_shared=yes) | 787 , enable_arts_shared=yes) |
785 arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" | 788 arts_lib_spec="$ARTS_PREFIX/$base_libdir/libartsc.so.*" |
786 arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | 789 arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` |
787 echo "-- $arts_lib_spec -> $arts_lib" | 790 echo "-- $arts_lib_spec -> $arts_lib" |
788 | 791 |
789 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) | 792 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) |
790 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" | 793 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" |
970 x11_lib='libX11.so' | 973 x11_lib='libX11.so' |
971 x11ext_lib='libXext.so' | 974 x11ext_lib='libXext.so' |
972 ;; | 975 ;; |
973 *) | 976 *) |
974 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] | 977 x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] |
975 for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do | 978 for path in $x11_lib_path /usr/$base_libdir /usr/X11/$base_libdir /usr/X11R6/$base_libdir; do |
976 if test "x$x11_lib" = "x"; then | 979 if test "x$x11_lib" = "x"; then |
977 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 980 x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
978 if test "x$x11_lib" = "x"; then | 981 if test "x$x11_lib" = "x"; then |
979 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] | 982 x11_lib=[`ls -- $path/libX11.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] |
980 fi | 983 fi |