Skip to content

Commit

Permalink
Mike Frysinger 2007-12-29 18:12:10 PST
Browse files Browse the repository at this point in the history
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 591f34f commit 8dfb2af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion configure.in
Expand Up @@ -126,7 +126,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
Expand Down

0 comments on commit 8dfb2af

Please sign in to comment.