1122ab0
--- SDL-1.2.11/configure.in.dynamic-esd	2007-03-19 17:44:47.000000000 +0100
1122ab0
+++ SDL-1.2.11/configure.in	2007-03-19 17:44:47.000000000 +0100
1122ab0
@@ -430,6 +430,16 @@
1122ab0
             AC_ARG_ENABLE(esd-shared,
1122ab0
 AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
1122ab0
                           , enable_esd_shared=yes)
1122ab0
+            if test "x`echo $ESD_LIBS | grep -- -L`" = "x"; then
1122ab0
+                pfx=${libdir##*/}
1122ab0
+                if test "x`ls /${pfx}/libesd.so.* 2> /dev/null`" != "x"; then
1122ab0
+                    ESD_LIBS="-L/${pfx} $ESD_LIBS"
1122ab0
+                elif test "x`ls /usr/${pfx}/libesd.so.* 2> /dev/null`" != "x"; then
1122ab0
+                    ESD_LIBS="-L/usr/${pfx} $ESD_LIBS"
1122ab0
+                elif test "x`ls /usr/local/${pfx}/libesd.so.* 2> /dev/null`" != "x"; then
1122ab0
+                    ESD_LIBS="-L/usr/local/${pfx} $ESD_LIBS"
1122ab0
+                fi
1122ab0
+            fi
1122ab0
             esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
1122ab0
             esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
1122ab0
             echo "-- $esd_lib_spec -> $esd_lib"