boost/boost-lib64.patch

89 lines
3.1 KiB
Diff
Raw Normal View History

--- 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")
+
+
+ if test "$kdelibsuff" = "auto"; then
+ 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],
@@ -80,16 +121,17 @@
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
+ AX_BOOST_CHECK_LIB64
dnl first we check the system location for boost libraries
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