From: oetiker Date: Wed, 20 Jul 2005 07:20:04 +0000 (+0000) Subject: make sure gcc-4.0 does not optimize our tests away :-) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=34047ee9b12c6e16590624e8bac78e53164fd257;p=rrdtool-all.git make sure gcc-4.0 does not optimize our tests away :-) git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@654 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/configure.ac b/program/configure.ac index 03c920f7..87d1e65a 100644 --- a/program/configure.ac +++ b/program/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