Skip to content
Permalink
Browse files

Updated find_lib to use $base_libdir

  • Loading branch information
slouken committed Oct 13, 2009
1 parent e00b9e9 commit 5fec055b3cbbe0e5090d49766a126e6bdfefc2e7
Showing with 7 additions and 3 deletions.
  1. +7 −3 configure.in
@@ -141,18 +141,22 @@ $srcdir/load_voc.c \
$srcdir/mixer.c \
$srcdir/music.c"

dnl set this to use on systems that use lib64 instead of lib
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`

dnl Function to find a library in the compiler search path
find_lib()
{
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
env_lib_path=[`echo $LIBS $LDFLAGS | sed 's/-L[ ]*//g'`]
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="/usr/lib /usr/local/lib"
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 -r | sed 's/.*\/\(.*\)/\1/; q'`]
lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$lib != x; then
echo $lib
return

0 comments on commit 5fec055

Please sign in to comment.