2009-02-16 14:08:16 +01:00
|
|
|
--- m4/ax_boost_base.m4
|
|
|
|
+++ m4/ax_boost_base.m4
|
|
|
|
@@ -35,6 +35,47 @@
|
|
|
|
# permitted in any medium without royalty provided the copyright notice
|
|
|
|
# and this notice are preserved.
|
|
|
|
|
|
|
|
+AC_DEFUN([AX_BOOST_CHECK_LIB64],
|
|
|
|
+[
|
|
|
|
+ AC_ARG_ENABLE(libsuffix,
|
|
|
|
+ AC_HELP_STRING([--enable-libsuffix],
|
|
|
|
+ [/lib directory suffix (64,32,none,auto[=default])]),
|
|
|
|
+ boostlibsuff=$enableval, boostlibsuff="auto")
|
|
|
|
+
|
|
|
|
+
|
2009-02-20 21:48:27 +01:00
|
|
|
+ if test "$boostlibsuff" = "auto"; then
|
2009-02-16 14:08:16 +01:00
|
|
|
+ cat > conftest.c << EOF
|
|
|
|
+#include <stdio.h>
|
|
|
|
+int main(int argc, char *argv[])
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+EOF
|
|
|
|
+
|
|
|
|
+ boostlibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
|
|
|
|
+ s,.*/lib\([[^\/]]*\)/.*,\1,
|
|
|
|
+ p
|
|
|
|
+}'`
|
|
|
|
+ rm -rf conftest.*
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+ if test "$boostlibsuff" = "no" || test "$boostlibsuff" = "none"; then
|
|
|
|
+ boostlibsuff=
|
|
|
|
+ fi
|
|
|
|
+ if test -z "$boostlibsuff"; then
|
|
|
|
+ AC_MSG_RESULT([not using lib directory suffix])
|
|
|
|
+ AC_DEFINE(BOOSTLIBSUFF, [""], Suffix for lib directories)
|
|
|
|
+ else
|
|
|
|
+ if test "$libdir" = '${exec_prefix}/lib'; then
|
|
|
|
+ libdir="$libdir${boostlibsuff}"
|
|
|
|
+ AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
|
|
|
|
+ fi
|
|
|
|
+ AC_DEFINE_UNQUOTED(BOOSTLIBSUFF, ["${boostlibsuff}"], Suffix for lib directories)
|
|
|
|
+ AC_MSG_RESULT([using lib directory suffix $boostlibsuff])
|
|
|
|
+ fi
|
|
|
|
+])
|
|
|
|
+
|
|
|
|
+
|
|
|
|
AC_DEFUN([AX_BOOST_BASE],
|
|
|
|
[
|
|
|
|
AC_ARG_WITH([boost],
|
2009-02-20 21:48:27 +01:00
|
|
|
@@ -77,6 +118,7 @@
|
|
|
|
boost_lib_version_req_sub_minor="0"
|
|
|
|
fi
|
|
|
|
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
|
|
|
+ AX_BOOST_CHECK_LIB64
|
2009-02-16 14:08:16 +01:00
|
|
|
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
|
|
|
succeeded=no
|
|
|
|
|
2009-02-20 21:48:27 +01:00
|
|
|
@@ -84,12 +126,12 @@
|
2009-02-16 14:08:16 +01:00
|
|
|
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
|
|
|
dnl or if you install boost with RPM
|
|
|
|
if test "$ac_boost_path" != ""; then
|
|
|
|
- BOOST_LDFLAGS="-L$ac_boost_path/lib"
|
|
|
|
+ BOOST_LDFLAGS="-L$ac_boost_path/lib${boostlibsuff}"
|
|
|
|
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
|
|
|
else
|
|
|
|
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/lib"
|
|
|
|
+ BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib${boostlibsuff}"
|
|
|
|
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
@@ -99,7 +141,7 @@
|
|
|
|
dnl overwrite ld flags if we have required special directory with
|
|
|
|
dnl --with-boost-libdir parameter
|
|
|
|
if test "$ac_boost_lib_path" != ""; then
|
|
|
|
- BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
|
|
|
+ BOOST_LDFLAGS="-L$ac_boost_lib_path${boostlibsuff}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
CPPFLAGS_SAVED="$CPPFLAGS"
|
|
|
|
@@ -163,7 +205,7 @@
|
|
|
|
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
|
|
|
if test "$ac_boost_lib_path" = ""
|
|
|
|
then
|
|
|
|
- BOOST_LDFLAGS="-L$best_path/lib"
|
|
|
|
+ BOOST_LDFLAGS="-L$best_path/lib${boostlibsuff}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$BOOST_ROOT" != "x"; then
|