Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Updated find_lib to use $base_libdir
- Loading branch information
Showing
with
7 additions
and
3 deletions.
-
+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 |
|
|