summaryrefslogtreecommitdiff
path: root/source4/build/m4/check_path.m4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2005-08-23 00:16:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:22 -0500
commiteacdca99df3ff2dff90c6dd16cec86cb0c905768 (patch)
tree84e98e3efd6806537e975b62bfbdb9896b628ebb /source4/build/m4/check_path.m4
parentb19ad7281eb0323a38bb2d0e2de3554caf88d3f8 (diff)
downloadsamba-eacdca99df3ff2dff90c6dd16cec86cb0c905768.tar.gz
samba-eacdca99df3ff2dff90c6dd16cec86cb0c905768.tar.bz2
samba-eacdca99df3ff2dff90c6dd16cec86cb0c905768.zip
r9494: Add ac-archive macro for checking GCC options. Use this to add to
developer CFLAGS to handle different versions of GCC. (This used to be commit 850d073c8569c758a6998021ee033793425316c9)
Diffstat (limited to 'source4/build/m4/check_path.m4')
-rw-r--r--source4/build/m4/check_path.m417
1 files changed, 15 insertions, 2 deletions
diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4
index 425a52805a..174ef85f11 100644
--- a/source4/build/m4/check_path.m4
+++ b/source4/build/m4/check_path.m4
@@ -150,9 +150,22 @@ AC_SUBST(developer)
AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
[if test x$enable_developer = xyes; then
debug=yes
- CFLAGS="${CFLAGS} -g -Wall"
developer=yes
- DEVELOPER_CFLAGS="-Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -Wformat=2 -Wno-format-y2k -DDEBUG_PASSWORD -DDEVELOPER"
+ DEVELOPER_CFLAGS="-DDEBUG_PASSWORD -DDEVELOPER"
+ if test x"$GCC" = x"yes" ; then
+ AX_CFLAGS_GCC_OPTION(-Wall, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wshadow, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Werror-implicit-function-declaration, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wstrict-prototypes, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wpointer-arith, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wcast-qual, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wcast-align, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wwrite-strings, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wmissing-format-attribute, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wformat=2, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wno-format-y2k, DEVELOPER_CFLAGS)
+ AX_CFLAGS_GCC_OPTION(-Wno-declaration-after-statement, DEVELOPER_CFLAGS)
+ fi
fi])
debug=no