Skip to content
Permalink
Browse files

Mike Frysinger 2007-12-29 18:12:10 PST

this patch makes it so find_lib() does not look in /usr/local/lib and /usr/lib
when cross-compiling as that can easily cause troubles
  • Loading branch information
slouken committed Oct 2, 2009
1 parent cb1165f commit 3fab180ebbfcf5d5bfe796598bc0754d12ec8453
Showing with 6 additions and 1 deletion.
  1. +6 −1 configure.in
@@ -120,7 +120,12 @@ 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'`]
for path in $gcc_bin_path $gcc_lib_path $env_lib_path /usr/lib /usr/local/lib; do
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="/usr/lib /usr/local/lib"
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'`]
if test x$lib != x; then
echo $lib

0 comments on commit 3fab180

Please sign in to comment.