Skip to content

Commit b50a4b7

Browse files
committed
build: quiet warnings in system headers installed from homebrew
1 parent 5558d2f commit b50a4b7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,16 @@ case $host in
746746
dnl It's safe to add these paths even if the functionality is disabled by
747747
dnl the user (--without-wallet or --without-gui for example).
748748

749+
dnl Homebrew may create symlinks in /usr/local/include for some packages.
750+
dnl Because MacOS's clang internally adds "-I /usr/local/include" to its search
751+
dnl paths, this will negate efforts to use -isystem for those packages, as they
752+
dnl will be found first in /usr/local. Use the internal "-internal-isystem"
753+
dnl option to system-ify all /usr/local/include paths without adding it to the list
754+
dnl of search paths in case it's not already there.
755+
if test "$suppress_external_warnings" != "no"; then
756+
AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem/usr/local/include], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem/usr/local/include"], [], [$CXXFLAG_WERROR])
757+
fi
758+
749759
if test "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then
750760
bdb_prefix=$($BREW --prefix berkeley-db@4 2>/dev/null)
751761
dnl This must precede the call to BITCOIN_FIND_BDB48 below.

0 commit comments

Comments
 (0)