aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
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 b023cf9c038..9348a4e9afd 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.381 2004/10/15 05:10:59 momjian Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.382 2004/10/20 02:12:06 neilc Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -250,8 +250,18 @@ else
fi
fi
-# Need to specify -fno-strict-aliasing too in case it's gcc 3.3 or later.
-PGAC_PROG_CC_NO_STRICT_ALIASING
+if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
+
+ # Some versions of GCC support some additional useful warning flags.
+ # Check whether they are supported, and add them to CFLAGS if so.
+ PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])
+ PGAC_PROG_CC_CFLAGS_OPT([-Wold-style-definition])
+ PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels])
+
+ # Disable strict-aliasing rules; needed for gcc 3.3+
+ PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
+fi
# supply -g if --enable-debug
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then