From: Wolfgang Bangerth Date: Fri, 25 Jan 2002 11:54:04 +0000 (+0000) Subject: Check for the availability of numeric_limits classes. X-Git-Tag: v8.0.0~18434 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=502c6a00299ccaff0effe373e7363d41292989d9;p=dealii.git Check for the availability of numeric_limits classes. git-svn-id: https://svn.dealii.org/trunk@5401 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/acconfig.h b/deal.II/acconfig.h index 040ea97e63..9e6823c19b 100644 --- a/deal.II/acconfig.h +++ b/deal.II/acconfig.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001 by the deal.II authors +// Copyright (C) 2001, 2002 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index b45eb4c0d0..a192056481 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -271,6 +271,7 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl ) + dnl rand_r is defined for some compiler flag combinations, but not for dnl others. check that. note that since these are C++ flags, we can't dnl just use AC_CHECK_FUNCS @@ -298,6 +299,7 @@ int i=rand_r(&i); ) + dnl On some systems (well, DEC Alphas are the only ones we know of), dnl gcc2.95 throws the hands in the air if it sees one of the AssertThrow dnl calls, and dies with an internal compiler error. If this is the case, @@ -469,7 +471,7 @@ dnl Up to early gcc2.95 releases, the i/ostringstream classes were not dnl available. check their availability, or whether we have to fall back dnl to the old strstream classes. dnl -dnl Usage: DEAL_II_HAVE_STD_RINGSTREAM +dnl Usage: DEAL_II_HAVE_STD_STRINGSTREAM dnl AC_DEFUN(DEAL_II_HAVE_STD_STRINGSTREAM, dnl AC_MSG_CHECKING(for std::i/ostringstream classes) @@ -495,6 +497,7 @@ AC_DEFUN(DEAL_II_HAVE_STD_STRINGSTREAM, dnl ) + dnl For gcc 2.95, when using the random_shuffle function with -ansi compiler flag, dnl there is an error saying that lrand48 is undeclared. Fix that by declaring dnl that function ourselves if necessary. @@ -618,3 +621,31 @@ AC_DEFUN(DEAL_II_CHECK_ADVANCE_WARNING, dnl ] ) ) + + + +dnl Check whether the numeric_limits classes are available +dnl +dnl Usage: DEAL_II_HAVE_STD_NUMERIC_LIMITS +dnl +AC_DEFUN(DEAL_II_HAVE_STD_NUMERIC_LIMITS, dnl + AC_MSG_CHECKING(for std::numeric_limits classes) + AC_LANG_CPLUSPLUS + CXXFLAGS="$CXXFLAGSG" + AC_TRY_COMPILE( + [ +#include + ], + [ + unsigned int i = std::numeric_limits::eps; + ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_STD_NUMERIC_LIMITS, 1, + [Define if the compiler's library in use provides + std::numeric_limits classes in the appropriate header file]) + ], + [ + AC_MSG_RESULT(no) + ]) +) diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index ddabbe72a5..8e6b3a27d1 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -57,6 +57,10 @@ std::i/ostringstream classes (early gcc versions did not) */ #undef HAVE_STD_STRINGSTREAM +/* Define if the compiler's library in use provides + std::numeric_limits classes in the appropriate header file */ +#undef HAVE_STD_NUMERIC_LIMITS + /* Define if you have the rand_r function */ #undef DEAL_II_DECLARE_LRAND48 diff --git a/deal.II/configure b/deal.II/configure index 7eb7bbab70..e56e8153f7 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -47,6 +47,13 @@ + + + + + + + @@ -650,7 +657,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:654: checking host system type" >&5 +echo "configure:661: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -671,7 +678,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:675: checking target system type" >&5 +echo "configure:682: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -689,7 +696,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:693: checking build system type" >&5 +echo "configure:700: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -727,7 +734,7 @@ cross_compiling=$ac_cv_prog_cxx_cross # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:731: checking for $ac_word" >&5 +echo "configure:738: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -757,7 +764,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:761: checking for $ac_word" >&5 +echo "configure:768: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -808,7 +815,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:812: checking for $ac_word" >&5 +echo "configure:819: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -840,7 +847,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:851: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -851,12 +858,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 855 "configure" +#line 862 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -882,12 +889,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:891: checking whether we are using GNU C" >&5 +echo "configure:898: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -896,7 +903,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -915,7 +922,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:919: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:926: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -949,7 +956,7 @@ fi # Extract the first word of "$CC", so it can be a program name with args. set dummy $CC; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:953: checking for $ac_word" >&5 +echo "configure:960: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -990,7 +997,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:994: checking for $ac_word" >&5 +echo "configure:1001: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1022,7 +1029,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1026: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1033: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1033,12 +1040,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1037 "configure" +#line 1044 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1064,12 +1071,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1068: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1075: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1073: checking whether we are using GNU C++" >&5 +echo "configure:1080: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1078,7 +1085,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1097,7 +1104,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1101: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1108: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1132,7 +1139,7 @@ CXXFLAGS="$OLDCXXFLAGS" # Extract the first word of "$CXX", so it can be a program name with args. set dummy $CXX; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1136: checking for $ac_word" >&5 +echo "configure:1143: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1326,9 +1333,9 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG -Werror" echo $ac_n "checking for std::advance warning""... $ac_c" 1>&6 -echo "configure:1330: checking for std::advance warning" >&5 +echo "configure:1337: checking for std::advance warning" >&5 cat > conftest.$ac_ext < @@ -1342,7 +1349,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -1425,12 +1432,12 @@ fi if test "$GXX" = yes ; then echo $ac_n "checking whether -ggdb works for long symbols""... $ac_c" 1>&6 -echo "configure:1429: checking whether -ggdb works for long symbols" >&5 +echo "configure:1436: checking whether -ggdb works for long symbols" >&5 case "$target" in alpha*-osf*) CXXFLAGS="-ggdb $CXXFLAGSG" cat > conftest.$ac_ext < @@ -1451,7 +1458,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* CXXFLAGSG="-ggdb $CXXFLAGSG" @@ -1542,7 +1549,7 @@ if test "$enablemultithreading" = yes ; then if test "$GXX" = yes ; then echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6 -echo "configure:1546: checking for platform specific thread flags" >&5 +echo "configure:1553: checking for platform specific thread flags" >&5 for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do CXXFLAGS="$CXXFLAGSG -$i" @@ -1578,7 +1585,7 @@ echo "configure:1546: checking for platform specific thread flags" >&5 echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6 -echo "configure:1582: checking for platform specific multi-threading defines" >&5 +echo "configure:1589: checking for platform specific multi-threading defines" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1587,7 +1594,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&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"""not necessary"" 1>&6 @@ -1646,7 +1653,7 @@ fi if test "$withmultithreading" != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1650: checking for ACE" >&5 +echo "configure:1657: checking for ACE" >&5 if test -d "$withmultithreading" ; then echo "$ac_t""found" 1>&6 else @@ -1667,7 +1674,7 @@ fi if test "$enablemultithreading" = yes ; then if test "$GXX" = yes ; then echo $ac_n "checking whether compilation with ACE disallows flags""... $ac_c" 1>&6 -echo "configure:1671: checking whether compilation with ACE disallows flags" >&5 +echo "configure:1678: checking whether compilation with ACE disallows flags" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1677,7 +1684,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="-ansi -I$withmultithreading" cat > conftest.$ac_ext < @@ -1687,7 +1694,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_ace_remove_ansi="no" @@ -1703,7 +1710,7 @@ fi rm -f conftest* CXXFLAGS="-pedantic -Werror -I$withmultithreading" cat > conftest.$ac_ext < @@ -1713,7 +1720,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_ace_remove_pedantic="no" @@ -1800,7 +1807,7 @@ done echo $ac_n "checking whether AssertThrow works with debug flags""... $ac_c" 1>&6 -echo "configure:1804: checking whether AssertThrow works with debug flags" >&5 +echo "configure:1811: checking whether AssertThrow works with debug flags" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1810,7 +1817,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSG cat > conftest.$ac_ext < @@ -1889,7 +1896,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1906,7 +1913,7 @@ fi rm -f conftest* echo $ac_n "checking whether AssertThrow works with optimized flags""... $ac_c" 1>&6 -echo "configure:1910: checking whether AssertThrow works with optimized flags" >&5 +echo "configure:1917: checking whether AssertThrow works with optimized flags" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1916,7 +1923,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSO cat > conftest.$ac_ext < @@ -1995,7 +2002,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2013,7 +2020,7 @@ rm -f conftest* echo $ac_n "checking for std::vector bug""... $ac_c" 1>&6 -echo "configure:2017: checking for std::vector bug" >&5 +echo "configure:2024: checking for std::vector bug" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2023,7 +2030,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -2064,7 +2071,7 @@ rm -f conftest* echo $ac_n "checking for std::iterator class""... $ac_c" 1>&6 -echo "configure:2068: checking for std::iterator class" >&5 +echo "configure:2075: checking for std::iterator class" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2074,7 +2081,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -2085,7 +2092,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2105,7 +2112,7 @@ fi rm -f conftest* echo $ac_n "checking for std::i/ostringstream classes""... $ac_c" 1>&6 -echo "configure:2109: checking for std::i/ostringstream classes" >&5 +echo "configure:2116: checking for std::i/ostringstream classes" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2115,7 +2122,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -2127,7 +2134,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2136,6 +2143,47 @@ if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; EOF +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t""no" 1>&6 + +fi +rm -f conftest* + + echo $ac_n "checking for std::numeric_limits classes""... $ac_c" 1>&6 +echo "configure:2158: checking for std::numeric_limits classes" >&5 + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + CXXFLAGS="$CXXFLAGSG" + cat > conftest.$ac_ext < + +int main() { + + unsigned int i = std::numeric_limits::eps; + +; return 0; } +EOF +if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STD_NUMERIC_LIMITS 1 +EOF + + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -2151,7 +2199,7 @@ rm -f conftest* echo $ac_n "checking whether lrand48 needs to be declared with -ansi""... $ac_c" 1>&6 -echo "configure:2155: checking whether lrand48 needs to be declared with -ansi" >&5 +echo "configure:2203: checking whether lrand48 needs to be declared with -ansi" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2161,7 +2209,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -2177,7 +2225,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -2198,7 +2246,7 @@ rm -f conftest* echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 -echo "configure:2202: checking whether getrusage is properly declared" >&5 +echo "configure:2250: checking whether getrusage is properly declared" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2207,7 +2255,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -2219,7 +2267,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2237,7 +2285,7 @@ fi rm -f conftest* echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 -echo "configure:2241: checking whether isnan is declared with debug flags" >&5 +echo "configure:2289: checking whether isnan is declared with debug flags" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2248,7 +2296,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSG deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2260,7 +2308,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2276,7 +2324,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2288,7 +2336,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2308,7 +2356,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSG $testflag" cat > conftest.$ac_ext < @@ -2320,7 +2368,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2333,7 +2381,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2345,7 +2393,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2367,7 +2415,7 @@ rm -f conftest* fi echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:2371: checking whether isnan is declared with optimized flags" >&5 +echo "configure:2419: checking whether isnan is declared with optimized flags" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -2378,7 +2426,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSO deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2390,7 +2438,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2406,7 +2454,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2418,7 +2466,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2438,7 +2486,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSO $testflag" cat > conftest.$ac_ext < @@ -2450,7 +2498,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2463,7 +2511,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2475,7 +2523,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2506,9 +2554,9 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSG echo $ac_n "checking for rand_r""... $ac_c" 1>&6 -echo "configure:2510: checking for rand_r" >&5 +echo "configure:2558: checking for rand_r" >&5 cat > conftest.$ac_ext < @@ -2520,7 +2568,7 @@ int i=rand_r(&i); ; return 0; } EOF -if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found" 1>&6 @@ -2543,12 +2591,12 @@ rm -f conftest* for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2547: checking for $ac_func" >&5 +echo "configure:2595: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2603,7 +2651,7 @@ done # Extract the first word of "f77", so it can be a program name with args. set dummy f77; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2607: checking for $ac_word" >&5 +echo "configure:2655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2639,7 +2687,7 @@ if test "x$F77" = "x" ; then # Extract the first word of "g77", so it can be a program name with args. set dummy g77; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2643: checking for $ac_word" >&5 +echo "configure:2691: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_F77'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2790,7 +2838,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2794: checking for $ac_word" >&5 +echo "configure:2842: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2828,7 +2876,7 @@ fi echo $ac_n "checking for HSL subroutines""... $ac_c" 1>&6 -echo "configure:2832: checking for HSL subroutines" >&5 +echo "configure:2880: checking for HSL subroutines" >&5 hsl_subroutines="" if test -r contrib/hsl/source/ma27.f ; then hsl_subroutines="$hsl_subroutines MA27" @@ -2893,7 +2941,7 @@ else fi echo $ac_n "checking for kdoc""... $ac_c" 1>&6 -echo "configure:2897: checking for kdoc" >&5 +echo "configure:2945: checking for kdoc" >&5 if test "$kdocdir" != ${DEAL2_DIR}/contrib/kdoc/bin ; then if test -r $kdocdir/kdoc ; then echo "$ac_t""found" 1>&6 @@ -2929,7 +2977,7 @@ if test "$docxx" = to-be-determined ; then # Extract the first word of ""doc++"", so it can be a program name with args. set dummy "doc++"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2933: checking for $ac_word" >&5 +echo "configure:2981: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2963,7 +3011,7 @@ fi else echo $ac_n "checking for doc++""... $ac_c" 1>&6 -echo "configure:2967: checking for doc++" >&5 +echo "configure:3015: checking for doc++" >&5 if test -x "$docxx" ; then echo "$ac_t""yes" 1>&6 else @@ -2986,16 +3034,16 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6 -echo "configure:2990: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:3038: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -3013,16 +3061,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:3017: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:3065: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 diff --git a/deal.II/configure.in b/deal.II/configure.in index a6ce7247ef..6e2fe2e194 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -653,9 +653,11 @@ dnl IBM's xlC compiler has a problem with some kind of code that does not dnl "using namespace std;" Try to work around if necessary DEAL_II_CHECK_IBM_XLC_ERROR -dnl See whether we can use the std::iterator and std::stringstream classes +dnl See whether we can use the std::iterator, std::stringstream, +dnl and std::numeric_limits classes DEAL_II_HAVE_STD_ITERATOR DEAL_II_HAVE_STD_STRINGSTREAM +DEAL_II_HAVE_STD_NUMERIC_LIMITS