backport find_lib() fix to get the latest version of the libraries. SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 14 Oct 2018 15:03:56 +0300
branchSDL-1.2
changeset 123240a340924677b
parent 12303 1e4343dedd37
child 12325 c4f2eeda176f
backport find_lib() fix to get the latest version of the libraries.

(default 2.0 branch commit: ee9c13257398)
configure.in
     1.1 --- a/configure.in	Sun Oct 07 17:56:56 2018 +0300
     1.2 +++ b/configure.in	Sun Oct 14 15:03:56 2018 +0300
     1.3 @@ -116,7 +116,7 @@
     1.4          host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     1.5      fi
     1.6      for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
     1.7 -        lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
     1.8 +        lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
     1.9          if test x$lib != x; then
    1.10              echo $lib
    1.11              return