diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-27 09:42:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-27 09:42:52 +0000 |
commit | b4971b39bf3df9edcdd6778c37cf667bd437cf92 (patch) | |
tree | 7d61dda2c3a822cfc6971bd47bf643aaf6b79427 /epan/configure.in | |
parent | cbf5c537c4e0ad18f3363815c89e71511a3d3fd7 (diff) |
From Joerg Mayer:
In the "configure.in" files, add
-D_U_="__attribute__((unused))"
to CFLAGS if we're using GCC, and add
-D_U_=""
otherwise, so _U_ can be used to mark arguments as unused.
Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works
with Microsoft Visual C++ as well.
Add comments and RCS IDs to the Makefile.nmake files that don't already
have them.
svn path=/trunk/; revision=4824
Diffstat (limited to 'epan/configure.in')
-rw-r--r-- | epan/configure.in | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/configure.in b/epan/configure.in index e54f0519ae..4ff6b554eb 100644 --- a/epan/configure.in +++ b/epan/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.19 2002/02/02 22:27:44 gerald Exp $ +# $Id: configure.in,v 1.20 2002/02/27 09:42:39 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 @@ -29,12 +29,20 @@ AC_PATH_PROG(LEX, flex) AC_SUBST(FLEX_PATH) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# +# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add +# '-D_U_="__attribute__((unused))"' as well, for future use when we +# remove '-Wno-unused'. +# +# 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 -Wno-unused' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS" AC_MSG_RESULT(yes) else + CFLAGS="-D_U_=\"\" $CFLAGS" AC_MSG_RESULT(no) fi |