Blob Blame History Raw
diff -up SDL-1.2.13/configure.in.dynamic-pulse SDL-1.2.13/configure.in
--- SDL-1.2.13/configure.in.dynamic-pulse	2008-01-07 12:31:57.000000000 +0100
+++ SDL-1.2.13/configure.in	2008-01-07 12:32:02.000000000 +0100
@@ -500,14 +510,15 @@ AC_HELP_STRING([--enable-pulseaudio], [u
         if test x$audio_pulse = xyes; then
             AC_ARG_ENABLE(pulseaudio-shared,
 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
-                          , enable_pulse_shared=yes)
+                          , enable_pulseaudio_shared=yes)
             if test "x`echo $PULSE_LIBS | grep -- -L`" = "x"; then
-                if test "x`ls /lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
-                    PULSE_LIBS="-L/lib $PULSE_LIBS"
-                elif test "x`ls /usr/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
-                    PULSE_LIBS="-L/usr/lib $PULSE_LIBS"
-                elif test "x`ls /usr/local/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
-                    PULSE_LIBS="-L/usr/local/lib $PULSE_LIBS"
+	        pfx=${libdir##*/}
+                if test "x`ls /${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then
+                    PULSE_LIBS="-L/${pfx} $PULSE_LIBS"
+                elif test "x`ls /usr/${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then
+                    PULSE_LIBS="-L/usr/${pfx} $PULSE_LIBS"
+                elif test "x`ls /usr/local/${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then
+                    PULSE_LIBS="-L/usr/local/${pfx} $PULSE_LIBS"
                 fi
             fi
             pulse_lib_spec=`echo $PULSE_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'`
@@ -518,11 +529,11 @@ AC_HELP_STRING([--enable-pulseaudio-shar
             SOURCES="$SOURCES $srcdir/src/audio/pulse/*.c"
             EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSE_CFLAGS"
             if test x$have_loadso != xyes && \
-               test x$enable_pulse_shared = xyes; then
+               test x$enable_pulseaudio_shared = xyes; then
                 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
             fi
             if test x$have_loadso = xyes && \
-               test x$enable_pulse_shared = xyes && test x$pulse_lib != x; then
+               test x$enable_pulseaudio_shared = xyes && test x$pulse_lib != x; then
                 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSE_DYNAMIC, "$pulse_lib")
             else
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSE_LIBS"