changeset 1606:d91c02552377

ls shouldn't barf if it gets passed a path starting with - (e.g. -lesd)
author Sam Lantinga <slouken@libsdl.org>
date Thu, 23 Mar 2006 21:46:24 +0000
parents b70cce8d7f62
children 932ba94c4032
files configure.in
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Thu Mar 23 21:39:58 2006 +0000
+++ b/configure.in	Thu Mar 23 21:46:24 2006 +0000
@@ -327,7 +327,7 @@
                 fi
             fi
             alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
-            alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+            alsa_lib=`ls -- $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
             echo "-- $alsa_lib_spec -> $alsa_lib"
 
             AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
@@ -423,7 +423,7 @@
 AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]]),
                           , enable_esd_shared=yes)
             esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
-            esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+            esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
             echo "-- $esd_lib_spec -> $esd_lib"
 
             AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
@@ -475,7 +475,7 @@
 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=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
+                arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
                 echo "-- $arts_lib_spec -> $arts_lib"
 
                 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
@@ -807,16 +807,16 @@
                     x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`]
                     for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do
                         if test "x$x11_lib" = "x"; then
-                            x11_lib=[`ls $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                            x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
                         fi
                         if test "x$x11ext_lib" = "x"; then
-                            x11ext_lib=[`ls $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                            x11ext_lib=[`ls -- $path/libXext.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
                         fi
                         if test "x$xrender_lib" = "x"; then
-                            xrender_lib=[`ls $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                            xrender_lib=[`ls -- $path/libXrender.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
                         fi
                         if test "x$xrandr_lib" = "x"; then
-                            xrandr_lib=[`ls $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
+                            xrandr_lib=[`ls -- $path/libXrandr.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
                         fi
                     done
                     ;;