autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] Add /opt/homebrew to path to lookup for boost.


From: fyquah
Subject: [PATCH] Add /opt/homebrew to path to lookup for boost.
Date: Sun, 21 Feb 2021 23:05:15 +0000

From: Fu Yong Quah <fyquah@protonmail.com>

Homebrew in the M1 Macs defauls to installing in /opt/homebrew. This
patch makes it possible to use boost macros out of the box in M1 Macs.

This patch has been tested to compile bitcoin core as per
https://github.com/bitcoin/bitcoin/pull/21231#issuecomment-782784303 

---
 m4/ax_boost_base.m4 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4
index 519f1c9..8e3bed0 100644
--- a/m4/ax_boost_base.m4
+++ b/m4/ax_boost_base.m4
@@ -11,7 +11,7 @@
 #   Test for the Boost C++ libraries of a particular version (or newer)
 #
 #   If no path to the installed boost library is given the macro searchs
-#   under /usr, /usr/local, /opt and /opt/local and evaluates the
+#   under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates 
the
 #   $BOOST_ROOT environment variable. Further documentation is available at
 #   <http://randspringer.de/boost/index.html>.
 #
@@ -151,7 +151,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
         else
             search_libsubdirs="$multiarch_libsubdir $libsubdirs"
         fi
-        for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; 
do
+        for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local 
/opt/homebrew; do
             if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test 
-r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
                 for libsubdir in $search_libsubdirs ; do
                     if ls 
"$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then 
break; fi
@@ -227,7 +227,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
             fi
         else
             if test "x$cross_compiling" != "xyes" ; then
-                for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt 
/opt/local ; do
+                for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt 
/opt/local /opt/homebrew; do
                     if test -d "$_AX_BOOST_BASE_boost_path" && test -r 
"$_AX_BOOST_BASE_boost_path" ; then
                         for i in `ls -d 
$_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
                             _version_tmp=`echo $i | sed 
"s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-- 
2.24.3 (Apple Git-128)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]