Skip to content

Commit

Permalink
m4/nut_compiler_family.m4: treat /usr/pkg/include as -isystem
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov committed Mar 31, 2022
1 parent f0bea56 commit aeb8ef4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions m4/nut_compiler_family.m4
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,17 @@ dnl # files do cause grief to picky compiler settings (more so from third
dnl # party packages shipped via /usr/local/... namespace):
AS_IF([test "x$CLANGCC" = xyes -o "x$GCC" = xyes], [
dnl # CFLAGS="-isystem /usr/include $CFLAGS"
CFLAGS="-isystem /usr/local/include $CFLAGS"
AS_IF([test -d /usr/local/include],
[CFLAGS="-isystem /usr/local/include $CFLAGS"])
AS_IF([test -d /usr/pkg/include],
[CFLAGS="-isystem /usr/pkg/include $CFLAGS"])
])
AS_IF([test "x$CLANGXX" = xyes -o "x$GXX" = xyes], [
dnl # CXXFLAGS="-isystem /usr/include $CXXFLAGS"
CXXFLAGS="-isystem /usr/local/include $CXXFLAGS"
AS_IF([test -d /usr/local/include],
[CXXFLAGS="-isystem /usr/local/include $CXXFLAGS"])
AS_IF([test -d /usr/pkg/include],
[CXXFLAGS="-isystem /usr/pkg/include $CXXFLAGS"])
])
dnl # Default to avoid noisy warnings on older compilers
Expand Down

0 comments on commit aeb8ef4

Please sign in to comment.