Andreas Schwab <[EMAIL PROTECTED]> writes: > Why not just use AC_HAVE_FUNCS(isinf)? IIUC this is part of a configure > script, although whether it is autoconf generated is not clear so far.
Though I don't know the why, rrdtool-1.2.10/configure.ac has the following macro. dnl HP-UX 11.00 does not have finite but does have isfinite as a macro so we need dnl actual code to check if this works AC_CHECK_FUNCS(fpclassify, , [AC_MSG_CHECKING(for fpclassify with <math.h>) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; 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 <math.h>) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; isfinite(f)]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISFINITE)],[AC_MSG_RESULT(no)])])]) AC_CHECK_FUNCS(isinf, , [AC_MSG_CHECKING(for isinf with <math.h>) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; int x = isinf(f)]])],[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISINF)],[AC_MSG_RESULT(no)])]) -- Hiroshi Fujishima