patch for boost macro

Jaap Eldering <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
Hi,

Attached is a patch for the macro m4/ax_boost_base.m4. I think this
fixes two small issues with detection of the system base library path
under which boost is found.

First, also when 'x86_64' is detected as host architecture/cpu then i386
should be used as fallback architecture.

Secondly, the fallback architecture should be added to the libsubdirs
list before the canonical host architecture to make sure that the latter
is selected if both are present.

Best regards,
Jaap
0001-Add-x86_64-as-host-architecture-with-fallback-to-i38.patch (text/x-patch, 1.4 KB)
From 6355a956901bd17cd5dad70772d3a7b8df440cd8 Mon Sep 17 00:00:00 2001
From: Jaap Eldering <[email protected]>
Date: Thu, 26 Mar 2015 22:48:44 +0000
Subject: [PATCH] Add 'x86_64' as host architecture with fallback to i386 and
 add the fallback before the canonical architecture to make sure that the
 latter is chosen if both are available.

---
 m4/ax_boost_base.m4 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4
index d7c9d0d..ab20095 100644
--- a/m4/ax_boost_base.m4
+++ b/m4/ax_boost_base.m4
@@ -102,15 +102,15 @@ if test "x$want_boost" = "xyes"; then
 
     dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
     dnl them priority over the other paths since, if libs are found there, they
-    dnl are almost assuredly the ones desired.
+    dnl are almost assuredly the ones desired. First add fallback architectures
+    dnl to make sure that the canonical architecture has preference.
     AC_REQUIRE([AC_CANONICAL_HOST])
-    libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
-
     case ${host_cpu} in
-      i?86)
+      i?86|x86_64)
         libsubdirs="lib/i386-${host_os} $libsubdirs"
         ;;
     esac
+    libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
 
     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
-- 
2.1.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.