Mike Frysinger 2007-12-29 18:12:10 PST
authorSam Lantinga <slouken@libsdl.org>
Fri, 02 Oct 2009 12:30:42 +0000
changeset 405bfb16c4e42e0
parent 404 590ad290e9f8
child 406 b67f52365db0
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
     1.1 --- a/configure.in	Fri Oct 02 12:01:24 2009 +0000
     1.2 +++ b/configure.in	Fri Oct 02 12:30:42 2009 +0000
     1.3 @@ -120,7 +120,12 @@
     1.4      gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
     1.5      gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
     1.6      env_lib_path=[`echo $LIBS $LDFLAGS | sed 's/-L[ ]*//g'`]
     1.7 -    for path in $gcc_bin_path $gcc_lib_path $env_lib_path /usr/lib /usr/local/lib; do
     1.8 +    if test "$cross_compiling" = yes; then
     1.9 +        host_lib_path=""
    1.10 +    else
    1.11 +        host_lib_path="/usr/lib /usr/local/lib"
    1.12 +    fi
    1.13 +    for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
    1.14          lib=[`ls -- $path/$1 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.15          if test x$lib != x; then
    1.16              echo $lib