configure.in
changeset 451 1b767145cf8d
parent 435 4b5aa99968ea
child 452 78188b7061be
     1.1 --- a/configure.in	Mon Oct 12 05:56:10 2009 +0000
     1.2 +++ b/configure.in	Tue Oct 13 06:54:16 2009 +0000
     1.3 @@ -141,18 +141,22 @@
     1.4  $srcdir/mixer.c \
     1.5  $srcdir/music.c"
     1.6  
     1.7 +dnl set this to use on systems that use lib64 instead of lib
     1.8 +base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
     1.9 +
    1.10 +dnl Function to find a library in the compiler search path
    1.11  find_lib()
    1.12  {
    1.13      gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
    1.14      gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
    1.15 -    env_lib_path=[`echo $LIBS $LDFLAGS | sed 's/-L[ ]*//g'`]
    1.16 +    env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
    1.17      if test "$cross_compiling" = yes; then
    1.18          host_lib_path=""
    1.19      else
    1.20 -        host_lib_path="/usr/lib /usr/local/lib"
    1.21 +        host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
    1.22      fi
    1.23      for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
    1.24 -        lib=[`ls -- $path/$1 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.25 +        lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
    1.26          if test x$lib != x; then
    1.27              echo $lib
    1.28              return