[nemiver] Detect boost when in /usr/lib64



commit 67a3b7d41c509964408b86fb4d5a7dae44bf2af9
Author: Dodji Seketeli <dodji seketeli org>
Date:   Sun Jan 16 21:58:34 2011 +0100

    Detect boost when in /usr/lib64
    
    Some systems like Fedora or RHEL install system libraries under
    /usr/lib64 when setup in 64 bits mode. In that case AX_BOOST_BASE
    wrongly sets BOOST_LDFLAGS to -L/usr/lib leading to further boost
    library detection tests to fail even though those libraries are
    installed.

 m4/ax_boost_base.m4 |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4
index 575a51e..7e3383d 100644
--- a/m4/ax_boost_base.m4
+++ b/m4/ax_boost_base.m4
@@ -63,16 +63,24 @@ if test "x$want_boost" = "xyes"; then
 	AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
 	succeeded=no
 
+	# Some systems like Fedora/RHEL put system libraries under
+	# /usr/lib64 when setup in 64 bits. We need to detect that.
+	LIBDIRNAME=lib
+   	is_64_bits=$(uname -m | grep 64 | wc -l)
+	if (test $is_64_bits -ne 0) && (test -f /etc/redhat-release); then
+	   LIBDIRNAME=lib64
+	fi
+
 	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"
+	if test "$ac_boost_path" != ""; then	   	
+		BOOST_LDFLAGS="-L$ac_boost_path/$LIBDIRNAME"
 		BOOST_CPPFLAGS="-I$ac_boost_path/include"
 	else
 		for ac_boost_path_tmp in /usr /usr/local /opt ; 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/$LIBDIRNAME"
 				BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
 				break;
 			fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]