diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-11-28 04:21:31 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-11-28 04:21:31 +0000 |
commit | 23be8c5a4bed9bb336b9fff434a4103bf396d7f0 (patch) | |
tree | 93de45cc9142027e97f1fd3d50fe0abfe99d0f69 /configure.in | |
parent | 0085a47c0cadf52ae5b2a3b97702298de48f520f (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6689 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
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" |