From 0f72cd04cebcd13ead065bbca093183cfab9f2f8 Mon Sep 17 00:00:00 2001 From: wolf Date: Sun, 15 Jul 2001 17:14:34 +0000 Subject: [PATCH] Check for rand_r/rand git-svn-id: https://svn.dealii.org/trunk@4844 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 25 ++++ deal.II/configure | 333 ++++++++++++++++++++++++------------------- deal.II/configure.in | 24 ++-- 3 files changed, 225 insertions(+), 157 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 2399c3e1e5..0810e8eb30 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -271,6 +271,31 @@ 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 +AC_DEFUN(DEAL_II_CHECK_RAND_R, dnl + AC_LANG_CPLUSPLUS + CXXFLAGS=$CXXFLAGSG + AC_MSG_CHECKING(for rand_r) + AC_TRY_COMPILE( + [ +#include + ], + [ +int seed = 0; +int i=rand_r(&i); + ], + [ + AC_MSG_RESULT(found) + AC_DEFINE(HAVE_RAND_R) + ], + [ + AC_MSG_RESULT(no) + ] + ) +) + 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 diff --git a/deal.II/configure b/deal.II/configure index 6ae19eeee0..12c364a02a 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -42,6 +42,8 @@ + + @@ -639,7 +641,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:643: checking host system type" >&5 +echo "configure:645: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -660,7 +662,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:664: checking target system type" >&5 +echo "configure:666: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -678,7 +680,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:682: checking build system type" >&5 +echo "configure:684: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -716,7 +718,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:720: checking for $ac_word" >&5 +echo "configure:722: 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 @@ -746,7 +748,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:750: checking for $ac_word" >&5 +echo "configure:752: 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 @@ -797,7 +799,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:801: checking for $ac_word" >&5 +echo "configure:803: 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 @@ -829,7 +831,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:833: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:835: 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. @@ -840,12 +842,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 844 "configure" +#line 846 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:851: \"$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 @@ -871,12 +873,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:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:877: 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:880: checking whether we are using GNU C" >&5 +echo "configure:882: 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 @@ -885,7 +887,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$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:891: \"$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 @@ -904,7 +906,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:908: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:910: 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 @@ -938,7 +940,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:942: checking for $ac_word" >&5 +echo "configure:944: 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 @@ -979,7 +981,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:983: checking for $ac_word" >&5 +echo "configure:985: 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 @@ -1011,7 +1013,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1015: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1017: 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. @@ -1022,12 +1024,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1026 "configure" +#line 1028 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1033: \"$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 @@ -1053,12 +1055,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:1057: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1059: 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:1062: checking whether we are using GNU C++" >&5 +echo "configure:1064: 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 @@ -1067,7 +1069,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1071: \"$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:1073: \"$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 @@ -1086,7 +1088,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:1090: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1092: 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 @@ -1121,7 +1123,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:1125: checking for $ac_word" >&5 +echo "configure:1127: 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 @@ -1359,75 +1361,16 @@ fi -for ac_func in gethostname -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1366: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1397: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - if test "$GXX" = yes ; then echo $ac_n "checking whether -ggdb works for long symbols""... $ac_c" 1>&6 -echo "configure:1426: checking whether -ggdb works for long symbols" >&5 +echo "configure:1369: checking whether -ggdb works for long symbols" >&5 case "$target" in alpha*-osf*) CXXFLAGS="-ggdb $CXXFLAGSG" cat > conftest.$ac_ext < @@ -1448,7 +1391,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* CXXFLAGSG="-ggdb $CXXFLAGSG" @@ -1539,7 +1482,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:1543: checking for platform specific thread flags" >&5 +echo "configure:1486: checking for platform specific thread flags" >&5 for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do CXXFLAGS="$CXXFLAGSG -$i" @@ -1575,7 +1518,7 @@ echo "configure:1543: checking for platform specific thread flags" >&5 echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6 -echo "configure:1579: checking for platform specific multi-threading defines" >&5 +echo "configure:1522: 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' @@ -1584,7 +1527,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:1545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""not necessary"" 1>&6 @@ -1649,7 +1592,7 @@ fi if test "$withmultithreading" != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1653: checking for ACE" >&5 +echo "configure:1596: checking for ACE" >&5 if test -d "$withmultithreading" ; then echo "$ac_t""found" 1>&6 else @@ -1670,7 +1613,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:1674: checking whether compilation with ACE disallows flags" >&5 +echo "configure:1617: 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' @@ -1680,7 +1623,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="-ansi -I$withmultithreading" cat > conftest.$ac_ext < @@ -1690,7 +1633,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_ace_remove_ansi="no" @@ -1706,7 +1649,7 @@ fi rm -f conftest* CXXFLAGS="-pedantic -Werror -I$withmultithreading" cat > conftest.$ac_ext < @@ -1716,7 +1659,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_ace_remove_pedantic="no" @@ -1798,7 +1741,7 @@ done echo $ac_n "checking whether AssertThrow works with debug flags""... $ac_c" 1>&6 -echo "configure:1802: checking whether AssertThrow works with debug flags" >&5 +echo "configure:1745: 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' @@ -1808,7 +1751,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:1766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1836,7 +1779,7 @@ fi rm -f conftest* echo $ac_n "checking whether AssertThrow works with optimized flags""... $ac_c" 1>&6 -echo "configure:1840: checking whether AssertThrow works with optimized flags" >&5 +echo "configure:1783: 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' @@ -1846,7 +1789,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSO cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1875,7 +1818,7 @@ rm -f conftest* echo $ac_n "checking for std::vector bug""... $ac_c" 1>&6 -echo "configure:1879: checking for std::vector bug" >&5 +echo "configure:1822: 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' @@ -1885,7 +1828,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:1852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -1926,7 +1869,7 @@ rm -f conftest* echo $ac_n "checking for std::iterator class""... $ac_c" 1>&6 -echo "configure:1930: checking for std::iterator class" >&5 +echo "configure:1873: 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' @@ -1936,7 +1879,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -1947,7 +1890,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -1967,8 +1910,11 @@ fi rm -f conftest* + + + echo $ac_n "checking whether lrand48 needs to be declared with -ansi""... $ac_c" 1>&6 -echo "configure:1972: checking whether lrand48 needs to be declared with -ansi" >&5 +echo "configure:1918: 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' @@ -1978,7 +1924,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS="$CXXFLAGSG" cat > conftest.$ac_ext < @@ -1994,7 +1940,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -2015,7 +1961,7 @@ rm -f conftest* echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 -echo "configure:2019: checking whether getrusage is properly declared" >&5 +echo "configure:1965: 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' @@ -2024,7 +1970,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -2036,7 +1982,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2053,9 +1999,8 @@ else fi rm -f conftest* - echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 -echo "configure:2059: checking whether isnan is declared with debug flags" >&5 +echo "configure:2004: 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' @@ -2066,7 +2011,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSG deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2078,7 +2023,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2094,7 +2039,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2106,7 +2051,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2126,7 +2071,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSG $testflag" cat > conftest.$ac_ext < @@ -2138,7 +2083,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2151,7 +2096,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2163,7 +2108,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2185,7 +2130,7 @@ rm -f conftest* fi echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:2189: checking whether isnan is declared with optimized flags" >&5 +echo "configure:2134: 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' @@ -2196,7 +2141,7 @@ cross_compiling=$ac_cv_prog_cxx_cross CXXFLAGS=$CXXFLAGSO deal_II_isnan_flag="" cat > conftest.$ac_ext < @@ -2208,7 +2153,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2224,7 +2169,7 @@ rm -f conftest* if test "x$deal_II_isnan_flag" = "x" ; then cat > conftest.$ac_ext < @@ -2236,7 +2181,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -2256,7 +2201,7 @@ rm -f conftest* for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSO $testflag" cat > conftest.$ac_ext < @@ -2268,7 +2213,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -2281,7 +2226,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -2293,7 +2238,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" @@ -2315,15 +2260,113 @@ rm -f conftest* fi + 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 + echo $ac_n "checking for rand_r""... $ac_c" 1>&6 +echo "configure:2273: checking for rand_r" >&5 + cat > conftest.$ac_ext < + +int main() { + +int seed = 0; +int i=rand_r(&i); + +; return 0; } +EOF +if { (eval echo configure:2287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t""found" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_RAND_R 1 +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* +for ac_func in gethostname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2310: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2341: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +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:2327: checking for $ac_word" >&5 +echo "configure:2370: 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 @@ -2359,7 +2402,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:2363: checking for $ac_word" >&5 +echo "configure:2406: 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 @@ -2505,7 +2548,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:2509: checking for $ac_word" >&5 +echo "configure:2552: 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 @@ -2543,7 +2586,7 @@ fi echo $ac_n "checking for HSL subroutines""... $ac_c" 1>&6 -echo "configure:2547: checking for HSL subroutines" >&5 +echo "configure:2590: checking for HSL subroutines" >&5 hsl_subroutines="" if test -r contrib/hsl/source/ma27.f ; then hsl_subroutines="$hsl_subroutines MA27" @@ -2608,7 +2651,7 @@ else fi echo $ac_n "checking for kdoc""... $ac_c" 1>&6 -echo "configure:2612: checking for kdoc" >&5 +echo "configure:2655: 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 @@ -2644,7 +2687,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:2648: checking for $ac_word" >&5 +echo "configure:2691: 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 @@ -2678,7 +2721,7 @@ fi else echo $ac_n "checking for doc++""... $ac_c" 1>&6 -echo "configure:2682: checking for doc++" >&5 +echo "configure:2725: checking for doc++" >&5 if test -x "$docxx" ; then echo "$ac_t""yes" 1>&6 else @@ -2701,16 +2744,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:2705: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:2748: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2728,16 +2771,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:2732: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:2775: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2784: \"$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 0bd65c1778..f58ef8f781 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -366,12 +366,6 @@ AC_SUBST(LIBS) AC_SUBST(LDFLAGS) -dnl ====================================================================== -dnl Check for operating system properties like header files and -dnl special functions. -dnl ====================================================================== -AC_CHECK_FUNCS(gethostname) - dnl We still need to set the flag for debug output. We will usually @@ -622,19 +616,25 @@ DEAL_II_CHECK_IBM_XLC_ERROR dnl See whether we can use the std::iterator class DEAL_II_HAVE_STD_ITERATOR + + +dnl ====================================================================== +dnl With all the right flags in place now, check for operating system +dnl properties like header files and accessibility of special functions +dnl with these flags. + dnl See whether we have to declare lrand48 ourselves with -ansi DEAL_II_HAVE_LRAND48_DECLARED -dnl See whether getrusage() is declared properly +dnl See whether getrusage() is declared properly, and for the present +dnl flags. likewise for other functions as well DEAL_II_CHECK_GETRUSAGE - -dnl Likewise for isnan() DEAL_II_CHECK_ISNAN +DEAL_II_CHECK_RAND_R +AC_CHECK_FUNCS(gethostname) - - - +dnl ====================================================================== dnl Find path to a Fortran 77 compiler. By default try to find a dnl vendor compiler which is usually names `f77', and only if that could dnl not be found, use `g77' instead. The reasoning is that usually vendor -- 2.39.5