diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-11-28 04:21:31 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-11-28 04:21:31 +0000 |
commit | 4056129fef9c56a34eb8109a2f846b24b542a526 (patch) | |
tree | 93de45cc9142027e97f1fd3d50fe0abfe99d0f69 /epan/configure.in | |
parent | a56c79201d66010ecca23bf6f6d57ef4001ec1af (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 'epan/configure.in')
-rw-r--r-- | epan/configure.in | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/epan/configure.in b/epan/configure.in index 08b15309a6..6c3acef525 100644 --- a/epan/configure.in +++ b/epan/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.31 2002/10/09 22:58:51 jmayer Exp $ +# $Id: configure.in,v 1.32 2002/11/28 04:21:29 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 @@ -34,13 +34,23 @@ AC_SUBST(FLEX_PATH) # 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" |