Improved find_lib, gets the latest version of libpng, etc.
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Jun 2013 21:47:23 -0700
changeset 7300 ee9c13257398
parent 7299 280e86365933
child 7301 3554be091b3b
Improved find_lib, gets the latest version of libpng, etc.
configure.in
--- a/configure.in	Fri Jun 07 18:26:55 2013 -0700
+++ b/configure.in	Fri Jun 07 21:47:23 2013 -0700
@@ -119,7 +119,7 @@
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     fi
     for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
-        lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
+        lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
         if test x$lib != x; then
             echo $lib
             return