From ede1e8d02a0dc6d70fdbd223bef6ad2d9a8bf2bf Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 20 Jul 2005 07:20:04 +0000 Subject: [PATCH] make sure gcc-4.0 does not optimize our tests away :-) git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@654 a5681a0c-68f1-0310-ab6d-d61299d08faa --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 03c920f..87d1e65 100644 --- a/configure.ac +++ b/configure.ac @@ -205,16 +205,19 @@ dnl HP-UX 11.00 does not have finite but does have isfinite as a macro so we nee dnl actual code to check if this works AC_CHECK_FUNCS(fpclassify, , [AC_MSG_CHECKING(for fpclassify with ) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[float f = 0.0; fpclassify(f)]])],[AC_MSG_RESULT(yes) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]], [[x = fpclassify(f)]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FPCLASSIFY)],[AC_MSG_RESULT(no)])]) AC_CHECK_FUNCS(finite, , [AC_CHECK_FUNCS(isfinite, , [AC_MSG_CHECKING(for isfinite with ) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[float f = 0.0; isfinite(f)]])],[AC_MSG_RESULT(yes) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]], [[x = isfinite(f)]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])])]) AC_CHECK_FUNCS(isinf, , [AC_MSG_CHECKING(for isinf with ) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[float f = 0.0; isinf(f)]])],[AC_MSG_RESULT(yes) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +volatile int x;volatile float f; ]], [[x = isinf(f)]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])]) AC_FULL_IEEE -- 2.30.2