diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-01-01 01:53:18 -0500 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-01-01 21:11:11 +0100 |
commit | ee549fc4d7faefec7968b61e1def3aa621fafc19 (patch) | |
tree | fb6ef938ef3745bae541e37179953bcae0342ed2 /m4/ax_boost_base.m4 | |
parent | 8b69076ff224ebb36a184a86ae786f774df493f4 (diff) | |
download | autoconf-archive-ee549fc4d7faefec7968b61e1def3aa621fafc19.tar.gz |
AX_BOOST_BASE: fix host boost search when cross-compiling
The AX_BOOST_BASE macro likes to do searches in the host paths (/usr and
such) which is obviously incorrect for cross-compiling. So disable these
fallback searches when cross-compiling.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'm4/ax_boost_base.m4')
-rw-r--r-- | m4/ax_boost_base.m4 | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 1d76fce..52bc81b 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -92,7 +92,7 @@ if test "x$want_boost" = "xyes"; then if test "$ac_boost_path" != ""; then BOOST_LDFLAGS="-L$ac_boost_path/$libsubdir" BOOST_CPPFLAGS="-I$ac_boost_path/include" - else + elif test "$cross_compiling" != yes; then for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" @@ -153,24 +153,26 @@ if test "x$want_boost" = "xyes"; then done fi else - for ac_boost_path in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done + if test "$cross_compiling" != yes; then + for ac_boost_path in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + best_path=$ac_boost_path + fi + done + fi + done - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - if test "$ac_boost_lib_path" = "" - then - BOOST_LDFLAGS="-L$best_path/$libsubdir" + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" + if test "$ac_boost_lib_path" = "" + then + BOOST_LDFLAGS="-L$best_path/$libsubdir" + fi fi if test "x$BOOST_ROOT" != "x"; then |