1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-05 23:38:41 +03:00

Put in defense against gcc -ffast-math.

This commit is contained in:
Peter Eisentraut
2002-09-20 18:38:57 +00:00
parent 316d4e29b2
commit 105907f7dc
2 changed files with 57 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.209 2002/09/17 04:27:41 momjian Exp $
dnl $Header: /cvsroot/pgsql/configure.in,v 1.210 2002/09/20 18:38:57 petere Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -253,12 +253,21 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
CFLAGS="$CFLAGS -g"
fi
AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
# Check if the compiler still works with the template settings
AC_MSG_CHECKING([whether the C compiler still works])
AC_TRY_LINK([], [return 0;],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot proceed])])
# Defend against gcc -ffastmath
if test "$GCC" = yes; then
AC_TRY_COMPILE([], [@%:@ifdef __FAST_MATH__
choke me
@%:@endif], [], [AC_MSG_ERROR([do not put -ffast-math in CFLAGS])])
fi
AC_PROG_CPP
AC_SUBST(GCC)