summaryrefslogtreecommitdiff
path: root/config/ac-macros/maintainer.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/ac-macros/maintainer.m4')
-rw-r--r--config/ac-macros/maintainer.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4
index 9b4bf3d076b..7b7df2668cd 100644
--- a/config/ac-macros/maintainer.m4
+++ b/config/ac-macros/maintainer.m4
@@ -15,10 +15,14 @@ AC_DEFUN([MY_MAINTAINER_MODE], [
# Set warning options required under maintainer mode.
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
+ # Detect ICC posing as GCC.
+ AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
+ [INTEL_COMPILER=no], [INTEL_COMPILER=yes])
# Setup GCC warning options.
- AS_IF([test "$GCC" = "yes"], [
+ AS_IF([test "$GCC" = "yes" -a "$INTEL_COMPILER" = "no"], [
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -DFORCE_INIT_OF_VARS"
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
+ C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
])
# Test whether the warning options work.