*** pgsql/configure.in 2006/04/29 16:34:41 1.463 --- pgsql/configure.in 2006/04/29 20:47:29 1.464 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. ! dnl $PostgreSQL: pgsql/configure.in,v 1.462 2006/04/29 00:51:41 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. ! dnl $PostgreSQL: pgsql/configure.in,v 1.463 2006/04/29 16:34:41 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl *************** else *** 248,266 **** fi fi ! # 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. 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]) else --- 248,267 ---- fi fi ! # Some versions of GCC support some additional useful warning flags. ! # Check whether they are supported, and add them to CFLAGS if so. if test "$GCC" = yes; then + + # ICC pretends to be GCC but it's lying; it doesn't support these options. + # So we have to check if "GCC" is really ICC. 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" PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement]) PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels]) else