[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C99 math-type macros
From: |
Schleicher Ralph (LLI) |
Subject: |
C99 math-type macros |
Date: |
Thu, 29 Aug 2002 15:35:23 +0200 |
autoconf (GNU Autoconf) 2.53
Hi,
on hppa2.0w-hp-hpux11.00, the Autoconf macro sequence
AC_SEARCH_LIBS([pow], [m])
AC_CHECK_FUNCS([isinf])
reports
checking for library containing pow... -lm
checking for isinf... no
The manual page for isinf(3) says:
"The isinf() macro replaces the isinf() and isinff() functions,
which are obsolete and are no longer supported."
Well, C99 replaces the traditional isnan() and isinf() functions with
generic isnan() and isinf() math-type macros. When the traditional
symbols are removed from the math library, the Autoconf test fails.
There seems to be a need for a new Autoconf test taking care for the
C99 math-type macros. Up to now I use the following test:
# RS_CHECK_MATH_FUNC(FUNCTION)
# ----------------------------
AC_DEFUN([RS_CHECK_MATH_FUNC],
[dnl
AC_MSG_CHECKING([for $1])
AC_TRY_LINK([#include <math.h>],
[#ifdef $1
char *__conftest = 0;
#else
char *__conftest = (char *) $1;
#endif],
[AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
[Define to 1 if you have
the `$1' function.])],
[AC_MSG_RESULT([no])])])
It would be nice if support for C99 math-type macros could be added to
Autoconf. Thanks,
--
Ralph Schleicher
System Engineering
Environmental Control Systems
Liebherr-Aerospace Lindenberg GmbH
P.O. Box 1363 * 88153 Lindenberg * Germany
Phone +49-8381-46-4057 * Fax +49-8381-46-4623
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- C99 math-type macros,
Schleicher Ralph (LLI) <=