--- /dev/null
+--- SDL-1.2.13/configure.in.orig 2008-02-04 21:20:52.978398000 +0100
++++ SDL-1.2.13/configure.in 2008-02-04 21:31:16.960293843 +0100
+@@ -348,7 +348,9 @@
+ AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
+ , enable_alsa_shared=yes)
+ if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
+- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
++ if test "x`ls $libdir/libasound.so.* 2> /dev/null`" != "x"; then
++ ALSA_LIBS="-L$libdir $ALSA_LIBS"
++ elif test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
+ ALSA_LIBS="-L/lib $ALSA_LIBS"
+ elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
+ ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
+@@ -501,7 +503,9 @@
+ AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
+ , enable_pulse_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
++ if test "x`ls $libdir/libpulse-simple.so.* 2> /dev/null`" != "x"; then
++ PULSE_LIBS="-L$libdir $PULSE_LIBS"
++ elif 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"
+@@ -561,7 +565,7 @@
+ AC_ARG_ENABLE(arts-shared,
+ AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
+ , enable_arts_shared=yes)
+- arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*"
++ arts_lib_spec="$libdir/libartsc.so.*"
+ arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+ echo "-- $arts_lib_spec -> $arts_lib"
+