aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-11-28 04:21:31 +0000
committerGuy Harris <guy@alum.mit.edu>2002-11-28 04:21:31 +0000
commit4056129fef9c56a34eb8109a2f846b24b542a526 (patch)
tree93de45cc9142027e97f1fd3d50fe0abfe99d0f69 /configure.in
parenta56c79201d66010ecca23bf6f6d57ef4001ec1af (diff)
Add a "--with-extra-gcc-checks" option, which causes "-Wcast-qual
-Wcast-align" to be added to CFLAGS (except in Wiretap, where we already do "-Wcast-qual"). We don't do them by default, as they produce some warnings that aren't easy to eliminate; if we figure out how to eliminate them on all platforms (or at least, on the platforms where you *can't* eliminate them, reduce them to a low level), we can make those options the default. svn path=/trunk/; revision=6689
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 5a14bd86f0..da00ec5cc1 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.187 2002/11/03 17:38:30 oabad Exp $
+# $Id: configure.in,v 1.188 2002/11/28 04:21:28 guy Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -57,13 +57,23 @@ AC_SUBST(HAVE_RPM)
# If we're running gcc, add '-Wall -W' to CFLAGS, and add
# '-D_U_="__attribute__((unused))"' as well, so we can use _U_ to
# flag unused function arguments and not get warnings about them.
+# If "--with-extra-gcc-checks" was specified, add "-Wcast-qual
+# -Wcast-align" as well. (Add more checks here in the future?)
#
# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
# argument will compile with non-GCC compilers.
#
-AC_MSG_CHECKING(to see if we can add '-Wall -W' to CFLAGS)
+AC_ARG_WITH(extra-gcc-checks,
+[ --with-extra-gcc-checks do additional -W checks in GCC. [default=no]],
+[
+ if test $withval != no
+ then
+ ethereal_extra_gcc_flags=" -Wcast-qual -Wcast-align"
+ fi
+],)
+AC_MSG_CHECKING(to see if we can add '-Wall -W$ethereal_extra_gcc_flags' to CFLAGS)
if test x$GCC != x ; then
- CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W $CFLAGS"
+ CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W$ethereal_extra_gcc_flags $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"