|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
dnl Process this file with autoconf to produce a configure script. |
|
|
|
|
dnl $Header: /cvsroot/pgsql/configure.in,v 1.295 2003/10/14 00:48:09 momjian Exp $ |
|
|
|
|
dnl $Header: /cvsroot/pgsql/configure.in,v 1.296 2003/10/15 22:23:56 tgl Exp $ |
|
|
|
|
dnl |
|
|
|
|
dnl Developers, please strive to achieve this order: |
|
|
|
|
dnl |
|
|
|
@ -234,18 +234,28 @@ AC_PROG_CC([$pgac_cc_list]) |
|
|
|
|
# |
|
|
|
|
. "$srcdir/src/template/$template" || exit |
|
|
|
|
|
|
|
|
|
# adjust CFLAGS per template |
|
|
|
|
# The template may have supplied a default setting for CFLAGS. |
|
|
|
|
# Override this if CFLAGS was set in the original environment. |
|
|
|
|
if test "$ac_env_CFLAGS_set" = set; then |
|
|
|
|
CFLAGS=$ac_env_CFLAGS_value |
|
|
|
|
fi |
|
|
|
|
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then |
|
|
|
|
CFLAGS="$CFLAGS -g" |
|
|
|
|
else |
|
|
|
|
# configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc |
|
|
|
|
if test x"$CFLAGS" = x""; then |
|
|
|
|
CFLAGS="-O" |
|
|
|
|
# autoconf already set the default CFLAGS for gcc to be -O2, but we |
|
|
|
|
# need to specify -fno-strict-aliasing too in case it's gcc 3.3 or later. |
|
|
|
|
if test "$GCC" = yes; then |
|
|
|
|
CFLAGS="$CFLAGS -fno-strict-aliasing" |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
# supply -g if --enable-debug |
|
|
|
|
if test "$enable_debug" = yes -a "$ac_cv_prog_cc_g" = yes; then |
|
|
|
|
CFLAGS="$CFLAGS -g" |
|
|
|
|
fi |
|
|
|
|
# default to -O rather than empty CFLAGS; this path will not be taken for |
|
|
|
|
# gcc (since autoconf supplies -O2), nor if --enable-debug (because -O -g |
|
|
|
|
# doesn't work on most non-gcc compilers), nor if the template provided |
|
|
|
|
# some CFLAGS. |
|
|
|
|
if test "$ac_env_CFLAGS_set" != set -a x"$CFLAGS" = x""; then |
|
|
|
|
CFLAGS="-O" |
|
|
|
|
fi |
|
|
|
|
AC_MSG_NOTICE([using CFLAGS=$CFLAGS]) |
|
|
|
|
|
|
|
|
|
# We already have this in Makefile.win32, but configure needs it too |
|
|
|
@ -261,7 +271,7 @@ AC_TRY_LINK([], [return 0;], |
|
|
|
|
[AC_MSG_RESULT(no) |
|
|
|
|
AC_MSG_ERROR([cannot proceed])]) |
|
|
|
|
|
|
|
|
|
# Defend against gcc -ffastmath |
|
|
|
|
# Defend against gcc -ffast-math |
|
|
|
|
if test "$GCC" = yes; then |
|
|
|
|
AC_TRY_COMPILE([], [@%:@ifdef __FAST_MATH__ |
|
|
|
|
choke me |
|
|
|
|