[dovecot-cvs] dovecot configure.in,1.312,1.313
tss at dovecot.org
tss at dovecot.org
Sat Nov 18 14:12:36 UTC 2006
Update of /var/lib/cvs/dovecot
In directory talvi:/tmp/cvs-serv26196
Modified Files:
configure.in
Log Message:
Enable -Wstrict-aliasing=2 with gcc 4.
Index: configure.in
===================================================================
RCS file: /var/lib/cvs/dovecot/configure.in,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -d -r1.312 -r1.313
--- configure.in 16 Nov 2006 00:16:31 -0000 1.312
+++ configure.in 18 Nov 2006 14:12:34 -0000 1.313
@@ -352,12 +352,20 @@
dnl * gcc specific options
if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
- # -Wcast-qual -Wcast-align -Wconversion # too many warnings
+ # -Wcast-qual -Wcast-align -Wconversion -Wunreachable-code # too many warnings
# -Wstrict-prototypes -Wredundant-decls # may give warnings in some systems
# -Wmissing-format-attribute -Wmissing-noreturn -Wwrite-strings # a couple of warnings
- # -Wstrict-aliasing=2 # requires new gcc
CFLAGS="$CFLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast"
+ AC_TRY_COMPILE([
+ #if __GNUC__ < 4
+ # error old gcc
+ #endif
+ ],,[
+ # gcc4
+ CFLAGS="$CFLAGS -Wstrict-aliasing=2"
+ ])
+
# Use std=gnu99 if we have new enough gcc
old_cflags=$CFLAGS
CFLAGS="-std=gnu99"
More information about the dovecot-cvs
mailing list