From 3fab180ebbfcf5d5bfe796598bc0754d12ec8453 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 2 Oct 2009 12:30:42 +0000 Subject: [PATCH] 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 --- configure.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index da8bb138..eb4af20b 100644 --- a/configure.in +++ b/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