dnl on Linux for example, it is only declared if we specifically require
dnl support for ISO C 99. This macro checks whether `isnan' is declared
dnl or whether we have to pass special compiler flags, namely
-dnl -D_ISOC99_SOURCE. Note that when checking we have to use the strict
-dnl compiler flags including -ansi -pedantic.
+dnl -D_ISOC99_SOURCE. Note that when checking we have to use the two
+dnl sets of compiler flags.
dnl
dnl Usage: DEAL_II_CHECK_ISNAN
dnl
AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl
- AC_MSG_CHECKING(whether isnan is declared)
+ AC_MSG_CHECKING(whether isnan is declared with debug flags)
AC_REQUIRE([AC_LANG_CPLUSPLUS])
CXXFLAGS="$CXXFLAGSG"
AC_TRY_COMPILE(
[
AC_MSG_RESULT("no")
CXXFLAGSG="$CXXFLAGSG -D_ISOC99_SOURCE"
+ ])
+ AC_MSG_CHECKING(whether isnan is declared with optimized flags)
+ AC_REQUIRE([AC_LANG_CPLUSPLUS])
+ CXXFLAGS="$CXXFLAGSO"
+ AC_TRY_COMPILE(
+ [
+#include <cmath>
+ ],
+ [
+ double d;
+ isnan (d);
+ ],
+ [
+ AC_MSG_RESULT("yes")
+ ],
+ [
+ AC_MSG_RESULT("no")
CXXFLAGSO="$CXXFLAGSO -D_ISOC99_SOURCE"
])
)
#! /bin/sh
-# From configure.in Revision: 1.27
+# From configure.in Revision: 1.28
fi
rm -f conftest*
- echo $ac_n "checking whether isnan is declared""... $ac_c" 1>&6
-echo "configure:1523: checking whether isnan is declared" >&5
+ echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6
+echo "configure:1523: checking whether isnan is declared with debug flags" >&5
CXXFLAGS="$CXXFLAGSG"
cat > conftest.$ac_ext <<EOF
echo "$ac_t"""no"" 1>&6
CXXFLAGSG="$CXXFLAGSG -D_ISOC99_SOURCE"
+
+fi
+rm -f conftest*
+ echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
+echo "configure:1555: checking whether isnan is declared with optimized flags" >&5
+
+ CXXFLAGS="$CXXFLAGSO"
+ cat > conftest.$ac_ext <<EOF
+#line 1559 "configure"
+#include "confdefs.h"
+
+#include <cmath>
+
+int main() {
+
+ double d;
+ isnan (d);
+
+; return 0; }
+EOF
+if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t"""yes"" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t"""no"" 1>&6
CXXFLAGSO="$CXXFLAGSO -D_ISOC99_SOURCE"
fi
echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:1571: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:1602: checking for consistency of CXXFLAGSG flags" >&5
CXXFLAGS="$CXXFLAGSG"
cat > conftest.$ac_ext <<EOF
-#line 1574 "configure"
+#line 1605 "configure"
#include "confdefs.h"
int main() {
;
; return 0; }
EOF
-if { (eval echo configure:1581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
rm -f conftest*
echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:1598: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:1629: checking for consistency of CXXFLAGSO flags" >&5
CXXFLAGS="$CXXFLAGSO"
cat > conftest.$ac_ext <<EOF
-#line 1601 "configure"
+#line 1632 "configure"
#include "confdefs.h"
int main() {
;
; return 0; }
EOF
-if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6