diff options
author | Jaap Eldering <eldering@A-Eskwadraat.nl> | 2010-08-11 15:07:21 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-08-18 18:39:01 +0200 |
commit | 99c1ff5504f5c68dd94fc0f0fcfa0594e5340efb (patch) | |
tree | b7eacfb90adee1cd347ec085ed95881703cc5862 /m4/ax_boost_base.m4 | |
parent | b145d7327023ead42d2625e64bc154db63987470 (diff) | |
download | autoconf-archive-99c1ff5504f5c68dd94fc0f0fcfa0594e5340efb.tar.gz |
On x86_64 architecture search both lib64 and lib dirs.
Diffstat (limited to 'm4/ax_boost_base.m4')
-rw-r--r-- | m4/ax_boost_base.m4 | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index d8f063c..c0453d7 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -84,9 +84,14 @@ if test "x$want_boost" = "xyes"; then AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) succeeded=no - libsubdir="lib" + dnl On x86_64 systems check for system libraries in both lib64 and lib. + dnl The former is specified by FHS, but e.g. Debian does not adhere to + dnl this (as it rises problems for generic multi-arch support). + dnl The last entry in the list is chosen by default when no libraries + dnl are found, e.g. when only header-only libraries are installed! + libsubdirs="lib" if test "$(uname -m)" = "x86_64"; then - libsubdir="lib64" + libsubdirs="lib64 lib lib64" fi dnl first we check the system location for boost libraries @@ -98,6 +103,9 @@ if test "x$want_boost" = "xyes"; then 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 + for libsubdir in $libsubdirs ; do + if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" break; @@ -172,13 +180,18 @@ if test "x$want_boost" = "xyes"; then 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" + if test "$ac_boost_lib_path" = ""; then + for libsubdir in $libsubdirs ; do + if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$best_path/$libsubdir" fi fi if test "x$BOOST_ROOT" != "x"; then + for libsubdir in $libsubdirs ; do + if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` |