mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Use special gcc -W flags only if we are using gcc, not if we are using
the Intel compiler. Jeremy Drake
This commit is contained in:
23
configure.in
23
configure.in
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl $PostgreSQL: pgsql/configure.in,v 1.457 2006/04/19 16:32:08 tgl Exp $
|
||||
dnl $PostgreSQL: pgsql/configure.in,v 1.458 2006/04/21 23:11:58 momjian Exp $
|
||||
dnl
|
||||
dnl Developers, please strive to achieve this order:
|
||||
dnl
|
||||
@@ -248,13 +248,22 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
|
||||
# The Intel compiler on Linux supports most gcc options, but not
|
||||
# all of them, so only add these options if we are really using
|
||||
# gcc
|
||||
|
||||
# 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([-Wendif-labels])
|
||||
if test "$GCC" = yes; then
|
||||
AC_TRY_COMPILE([], [@%:@ifndef __INTEL_COMPILER
|
||||
choke me
|
||||
@%:@endif], [ICC=[yes]], [ICC=[no]])
|
||||
if test "$ICC" = no; then
|
||||
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
|
||||
|
||||
# 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([-Wendif-labels])
|
||||
fi
|
||||
|
||||
# Disable strict-aliasing rules; needed for gcc 3.3+
|
||||
PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
|
||||
|
Reference in New Issue
Block a user