From edea30b6fe3b4667c758265b57528e99fb0b16b3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 16 Feb 2001 09:51:19 +0000 Subject: [PATCH] Reorder checks to group all C++ tests at one point. git-svn-id: https://svn.dealii.org/trunk@3954 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 1285 +++++++++++++++++++++--------------------- deal.II/configure.in | 157 +++--- 2 files changed, 727 insertions(+), 715 deletions(-) diff --git a/deal.II/configure b/deal.II/configure index 31cb7e90a9..ec6cde3e78 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.49 +# From configure.in Revision: 1.52 @@ -1565,218 +1565,306 @@ fi rm -f conftest* -# 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:1572: 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 - case "$F77" in - /*) - ac_cv_path_F77="$F77" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_F77="$F77" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_F77="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -F77="$ac_cv_path_F77" -if test -n "$F77"; then - echo "$ac_t""$F77" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi + echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 +echo "configure:1570: 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' +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 -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:1608: 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 - case "$F77" in - /*) - ac_cv_path_F77="$F77" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_F77="$F77" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_F77="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -F77="$ac_cv_path_F77" -if test -n "$F77"; then - echo "$ac_t""$F77" 1>&6 + cat > conftest.$ac_ext < + +int main() { + + rusage *ru; + getrusage(RUSAGE_SELF,ru); + +; return 0; } +EOF +if { (eval echo configure:1591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t"""yes"" 1>&6 + else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t"""no"" 1>&6 + CXXFLAGSG="$CXXFLAGSG -DNO_HAVE_GETRUSAGE" + CXXFLAGSO="$CXXFLAGSO -DNO_HAVE_GETRUSAGE" + fi +rm -f conftest* -fi -if test "x$F77" != "x" ; then - F77_VERSION_STRING="`($F77 -v 2>&1)`" - if test -n "`echo $F77_VERSION_STRING | grep \"GNU F77\"`" ; then - G77_VERSION_STRING="`($F77 -v 2>&1) | grep \"gcc version\"`" - case "$G77_VERSION_STRING" in - *"egcs-1.1"*) - echo "$ac_t""compiler is egcs-1.1" 1>&6 - F77_VERSION=egcs1.1 - ;; - *2.95*) - echo "$ac_t""compiler is gcc-2.95" 1>&6 - F77_VERSION=gcc2.95 - ;; - *2.96*) - echo "$ac_t""compiler is gcc-2.96" 1>&6 - F77_VERSION=gcc2.96 - ;; - *2.97*) - echo "$ac_t""compiler is gcc-2.97" 1>&6 - F77_VERSION=gcc2.97 - ;; - *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) - echo "$ac_t""compiler is $G77_VERSION_STRING" 1>&6 - { echo "configure: error: compiler is not supported" 1>&2; exit 1; } - ;; - *) - echo "$ac_t""compiler is unknown but accepted gcc version" 1>&6 - F77_VERSION=other - ;; - esac - - F77FLAGSG="$FFLAGS -ggdb -DDEBUG -pedantic -W -Wall" - F77FLAGSO="$FFLAGS -O2" + echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 +echo "configure:1610: 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' +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 - if test "x$F77_VERSION" != "xegcs1.1" ; then - F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing" - fi + CXXFLAGS=$CXXFLAGSG + deal_II_isnan_flag="" + cat > conftest.$ac_ext < + +int main() { - F77LDFLAGS="-lg2c" + double d=0; + isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_ISNAN" + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* - else - if test -n "`echo $F77_VERSION_STRING | grep \"XL Fortran for AIX\"`" ; then + if test "x$deal_II_isnan_flag" = "x" ; then + cat > conftest.$ac_ext <&6 - F77FLAGSG="$FFLAGS -g" - F77FLAGSO="$FFLAGS -O3 -w" - F77LDFLAGS="-lxlf90" +#include + +int main() { - - else + double d=0; + _isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN" + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi - F77_VERSION_STRING=`($F77 -V 2>&1)` - if test -n "`echo $F77_VERSION_STRING | grep \"WorkShop Compilers\"`" ; then - echo "$ac_t""compiler is Sun WorkShop f77" 1>&6 - F77_VERSION="SunF77" - F77FLAGSG="$FFLAGS -silent -g" - F77FLAGSO="$FFLAGS -silent -O3 -w" - F77LDFLAGS="-lF77 -lsunmath -lM77" + if test "x$deal_II_isnan_flag" = "x" ; then + deal_II_isnan_flag="" + for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do + CXXFLAGS="$CXXFLAGSG $testflag" + cat > conftest.$ac_ext < + +int main() { - else + double d=0; + isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + deal_II_isnan_flag="-DHAVE_ISNAN $testflag" + break; + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* - F77_VERSION_STRING=`($F77 -version 2>&1)` - if test -n "`echo $F77_VERSION_STRING | grep MIPSpro`" ; then - echo "$ac_t""compiler is MIPSpro f77" 1>&6 - F77_VERSION="MIPSproF77" - F77FLAGSG="$FFLAGS -ansi -g" - F77FLAGSO="$FFLAGS -O3 -woffall" - F77LDFLAGS="-lftn" + cat > conftest.$ac_ext < + +int main() { - else + double d=0; + _isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" + break; + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + done - F77_VERSION= - echo "$ac_t""compiler is unkown. no flags set!" 1>&6 - fi - fi + if test "x$deal_II_isnan_flag" = "x" ; then + echo "$ac_t""no." 1>&6 + else + echo "$ac_t""using $testflag" 1>&6 + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" fi fi + + echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 +echo "configure:1740: 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' +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=$CXXFLAGSO + deal_II_isnan_flag="" + cat > conftest.$ac_ext < + +int main() { + + double d=0; + isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_ISNAN" + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi +rm -f conftest* + if test "x$deal_II_isnan_flag" = "x" ; then + cat > conftest.$ac_ext < + +int main() { + double d=0; + _isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN" + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + 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:1750: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "x$deal_II_isnan_flag" = "x" ; then + deal_II_isnan_flag="" + for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do + CXXFLAGS="$CXXFLAGSO $testflag" + cat > conftest.$ac_ext < + +int main() { + + double d=0; + isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + deal_II_isnan_flag="-DHAVE_ISNAN $testflag" + break; + else - case "$PERL" in - /*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PERL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi -PERL="$ac_cv_path_PERL" -if test -n "$PERL"; then - echo "$ac_t""$PERL" 1>&6 +rm -f conftest* + + cat > conftest.$ac_ext < + +int main() { + + double d=0; + _isnan (d); + +; return 0; } +EOF +if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" + break; + else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 fi +rm -f conftest* + done + + if test "x$deal_II_isnan_flag" = "x" ; then + echo "$ac_t""no." 1>&6 + else + echo "$ac_t""using $testflag" 1>&6 + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" + fi + fi + @@ -1799,7 +1887,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:1803: checking for platform specific thread flags" >&5 +echo "configure:1891: checking for platform specific thread flags" >&5 for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do CXXFLAGS="$CXXFLAGSG -$i" @@ -1835,7 +1923,7 @@ echo "configure:1803: checking for platform specific thread flags" >&5 echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6 -echo "configure:1839: checking for platform specific multi-threading defines" >&5 +echo "configure:1927: 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' @@ -1844,7 +1932,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:1950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""not necessary"" 1>&6 @@ -1910,7 +1998,7 @@ fi if test "$withmultithreading" != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1914: checking for ACE" >&5 +echo "configure:2002: checking for ACE" >&5 if test -d "$withmultithreading" ; then echo "$ac_t""found" 1>&6 else @@ -1927,226 +2015,181 @@ fi -echo $ac_n "checking for HSL subroutines""... $ac_c" 1>&6 -echo "configure:1932: checking for HSL subroutines" >&5 -hsl_subroutines="" -if test -r contrib/hsl/source/ma27.f ; then - hsl_subroutines="$hsl_subroutines MA27" - cat >> confdefs.h <<\EOF -#define HAVE_HSL_MA27 1 -EOF - -fi - -if test -r contrib/hsl/source/ma47.f -a -r contrib/hsl/source/ma47dep.f ; then - hsl_subroutines="$hsl_subroutines MA47" - cat >> confdefs.h <<\EOF -#define HAVE_HSL_MA47 1 -EOF - -fi - -echo "$ac_t""$hsl_subroutines" 1>&6 - -if test "x$hsl_subroutines" != "x" ; then - USE_CONTRIB_HSL=yes -else - USE_CONTRIB_HSL=no -fi - -# Check whether --with-blas or --without-blas was given. -if test "${with_blas+set}" = set; then - withval="$with_blas" - if test "$withval" != no ; then - echo $ac_n "checking for BLAS""... $ac_c" 1>&6 -echo "configure:1966: checking for BLAS" >&5 - if test -r "$withval" ; then - echo "$ac_t""found" 1>&6 - else - echo "$ac_t""not found" 1>&6 - { echo "configure: error: BLAS library $withval not readable" 1>&2; exit 1; } - fi - cat >> confdefs.h <<\EOF -#define HAVE_LIBBLAS 1 -EOF - LIBS="$withval -lg2c $LIBS"; - fi - -else - echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6 -echo "configure:1982: checking for main in -lblas" >&5 -ac_lib_var=`echo blas'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +# 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:2026: 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 - ac_save_LIBS="$LIBS" -LIBS="-lblas $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - + case "$F77" in + /*) + ac_cv_path_F77="$F77" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_F77="$F77" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_F77="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lblas -lg2c $LIBS" ; cat >> confdefs.h <<\EOF -#define HAVE_LIBBLAS 1 -EOF - +F77="$ac_cv_path_F77" +if test -n "$F77"; then + echo "$ac_t""$F77" 1>&6 else echo "$ac_t""no" 1>&6 fi - -fi - - -# Check whether --with-lapack or --without-lapack was given. -if test "${with_lapack+set}" = set; then - withval="$with_lapack" - if test "$withval" != no ; then - echo $ac_n "checking for LAPACK""... $ac_c" 1>&6 -echo "configure:2029: checking for LAPACK" >&5 - if test -r "$withval" ; then - echo "$ac_t""found" 1>&6 - else - echo "$ac_t""not found" 1>&6 - { echo "configure: error: LAPACK library $withval not readable" 1>&2; exit 1; } - fi - cat >> confdefs.h <<\EOF -#define HAVE_LIBLAPACK 1 -EOF - - LIBS="$withval $LIBS"; - fi - -else - echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6 -echo "configure:2045: checking for dgels_ in -llapack" >&5 -ac_lib_var=`echo lapack'_'dgels_ | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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:2062: 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 - ac_save_LIBS="$LIBS" -LIBS="-llapack $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + case "$F77" in + /*) + ac_cv_path_F77="$F77" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_F77="$F77" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_F77="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +F77="$ac_cv_path_F77" +if test -n "$F77"; then + echo "$ac_t""$F77" 1>&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$ac_t""no" 1>&6 fi -rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo lapack | sed -e 's/^a-zA-Z0-9_/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 + F77_VERSION=egcs1.1 + ;; + *2.95*) + echo "$ac_t""compiler is gcc-2.95" 1>&6 + F77_VERSION=gcc2.95 + ;; + *2.96*) + echo "$ac_t""compiler is gcc-2.96" 1>&6 + F77_VERSION=gcc2.96 + ;; + *2.97*) + echo "$ac_t""compiler is gcc-2.97" 1>&6 + F77_VERSION=gcc2.97 + ;; + *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) + echo "$ac_t""compiler is $G77_VERSION_STRING" 1>&6 + { echo "configure: error: compiler is not supported" 1>&2; exit 1; } + ;; + *) + echo "$ac_t""compiler is unknown but accepted gcc version" 1>&6 + F77_VERSION=other + ;; + esac -else - echo "$ac_t""no" 1>&6 -$LIBS -fi + F77FLAGSG="$FFLAGS -ggdb -DDEBUG -pedantic -W -Wall" + F77FLAGSO="$FFLAGS -O2" + if test "x$F77_VERSION" != "xegcs1.1" ; then + F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing" + fi -fi + if test $enableshared = yes ; then + F77FLAGSG="$F77FLAGSG -fPIC" + F77FLAGSO="$F77FLAGSO -fPIC" + fi + F77LDFLAGS="-lg2c" + else -# Check whether --enable-multigrid or --disable-multigrid was given. -if test "${enable_multigrid+set}" = set; then - enableval="$enable_multigrid" - enablemultigrid=$enableval -else - if test -r deal.II/source/multigrid ; then - enablemultigrid=yes ; - else - enablemultigrid=no ; - fi -fi + if test -n "`echo $F77_VERSION_STRING | grep \"XL Fortran for AIX\"`" ; then -if test "$enablemultigrid" = yes ; then - echo "$ac_t""configuring multigrid" 1>&6 - cat >> confdefs.h <<\EOF -#define ENABLE_MULTIGRID 1 -EOF + F77_VERSION=AIXF77 + echo "$ac_t""compiler is AIX Fortran77" 1>&6 + F77FLAGSG="$FFLAGS -g" + F77FLAGSO="$FFLAGS -O3 -w" + F77LDFLAGS="-lxlf90" -fi + + else + F77_VERSION_STRING=`($F77 -V 2>&1)` + if test -n "`echo $F77_VERSION_STRING | grep \"WorkShop Compilers\"`" ; then + echo "$ac_t""compiler is Sun WorkShop f77" 1>&6 + F77_VERSION="SunF77" + F77FLAGSG="$FFLAGS -silent -g" + F77FLAGSO="$FFLAGS -silent -O3 -w" + F77LDFLAGS="-lF77 -lsunmath -lM77" + if test $enableshared = yes ; then + F77FLAGSG="$F77FLAGSG -PIC" + F77FLAGSO="$F77FLAGSO -PIC" + fi + else + F77_VERSION_STRING=`($F77 -version 2>&1)` + if test -n "`echo $F77_VERSION_STRING | grep MIPSpro`" ; then + echo "$ac_t""compiler is MIPSpro f77" 1>&6 + F77_VERSION="MIPSproF77" + F77FLAGSG="$FFLAGS -ansi -g" + F77FLAGSO="$FFLAGS -O3 -woffall" + F77LDFLAGS="-lftn" -# Check whether --with-kdoc or --without-kdoc was given. -if test "${with_kdoc+set}" = set; then - withval="$with_kdoc" - kdocdir=$withval -else - kdocdir=${DEAL2_DIR}/contrib/kdoc/bin -fi + if test $enableshared = yes ; then + F77FLAGSG="$F77FLAGSG -shared -KPIC" + F77FLAGSO="$F77FLAGSO -shared -KPIC" + else + F77FLAGSG="$F77FLAGSG -non_shared" + F77FLAGSO="$F77FLAGSO -non_shared" + fi -echo $ac_n "checking for kdoc""... $ac_c" 1>&6 -echo "configure:2134: 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 - else - echo "$ac_t""not found" 1>&6 - { echo "configure: error: Invalid kdoc path $kdocdir/kdoc" 1>&2; exit 1; } - fi + else - if test -r "$kdocdir/Version" ; then - kdocversion=`cat $kdocdir/Version` ; - else - kdocversion=1; + F77_VERSION= + echo "$ac_t""compiler is unkown. no flags set!" 1>&6 + fi + fi + fi fi -else - kdocversion=`cat ${DEAL2_DIR}/contrib/kdoc/src/Version` - echo "$ac_t""using default version $kdocversion" 1>&6 fi @@ -2154,28 +2197,19 @@ fi -# Check whether --with-docxx or --without-docxx was given. -if test "${with_docxx+set}" = set; then - withval="$with_docxx" - docxx=$withval -else - docxx=to-be-determined -fi - -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 +# 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:2170: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then +echo "configure:2204: 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 - case "$docxx" in + case "$PERL" in /*) - ac_cv_path_docxx="$docxx" # Let the user override the test with a path. + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_docxx="$docxx" # Let the user override the test with a dos path. + ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -2183,7 +2217,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_docxx="$ac_dir/$ac_word" + ac_cv_path_PERL="$ac_dir/$ac_word" break fi done @@ -2191,327 +2225,300 @@ else ;; esac fi -docxx="$ac_cv_path_docxx" -if test -n "$docxx"; then - echo "$ac_t""$docxx" 1>&6 +PERL="$ac_cv_path_PERL" +if test -n "$PERL"; then + echo "$ac_t""$PERL" 1>&6 else echo "$ac_t""no" 1>&6 fi -else - echo $ac_n "checking for doc++""... $ac_c" 1>&6 -echo "configure:2204: checking for doc++" >&5 - if test -x "$docxx" ; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - docxx= - fi -fi +echo $ac_n "checking for HSL subroutines""... $ac_c" 1>&6 +echo "configure:2242: checking for HSL subroutines" >&5 +hsl_subroutines="" +if test -r contrib/hsl/source/ma27.f ; then + hsl_subroutines="$hsl_subroutines MA27" + cat >> confdefs.h <<\EOF +#define HAVE_HSL_MA27 1 +EOF - echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 -echo "configure:2219: 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' -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 +fi - cat > conftest.$ac_ext <> confdefs.h <<\EOF +#define HAVE_HSL_MA47 1 +EOF -#include - -int main() { +fi - rusage *ru; - getrusage(RUSAGE_SELF,ru); - -; return 0; } -EOF -if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t"""yes"" 1>&6 - + +if test "x$hsl_subroutines" != "x" ; then + echo "$ac_t""$hsl_subroutines" 1>&6 + USE_CONTRIB_HSL=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t"""no"" 1>&6 - CXXFLAGSG="$CXXFLAGSG -DNO_HAVE_GETRUSAGE" - CXXFLAGSO="$CXXFLAGSO -DNO_HAVE_GETRUSAGE" - + echo "$ac_t""none found" 1>&6 + USE_CONTRIB_HSL=no fi -rm -f conftest* - echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 -echo "configure:2258: 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' -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 - deal_II_isnan_flag="" - cat > conftest.$ac_ext < - -int main() { - double d=0; - isnan (d); - -; return 0; } +# Check whether --with-blas or --without-blas was given. +if test "${with_blas+set}" = set; then + withval="$with_blas" + if test "$withval" != no ; then + echo $ac_n "checking for BLAS""... $ac_c" 1>&6 +echo "configure:2277: checking for BLAS" >&5 + if test -r "$withval" ; then + echo "$ac_t""found" 1>&6 + else + echo "$ac_t""not found" 1>&6 + { echo "configure: error: BLAS library $withval not readable" 1>&2; exit 1; } + fi + cat >> confdefs.h <<\EOF +#define HAVE_LIBBLAS 1 EOF -if { (eval echo configure:2281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + + LIBS="$withval -lg2c $LIBS"; + fi - echo "$ac_t"""yes"" 1>&6 - deal_II_isnan_flag="-DHAVE_ISNAN" - CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - - - if test "x$deal_II_isnan_flag" = "x" ; then - cat > conftest.$ac_ext <&6 +echo "configure:2293: checking for main in -lblas" >&5 +ac_lib_var=`echo blas'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lblas $LIBS" +cat > conftest.$ac_ext < - int main() { - - double d=0; - _isnan (d); - +main() ; return 0; } EOF -if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - - echo "$ac_t"""yes"" 1>&6 - deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN" - CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" - + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - fi +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lblas -lg2c $LIBS" ; cat >> confdefs.h <<\EOF +#define HAVE_LIBBLAS 1 +EOF +else + echo "$ac_t""no" 1>&6 +fi - if test "x$deal_II_isnan_flag" = "x" ; then - deal_II_isnan_flag="" - for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do - CXXFLAGS="$CXXFLAGSG $testflag" - cat > conftest.$ac_ext <&6 +echo "configure:2340: checking for LAPACK" >&5 + if test -r "$withval" ; then + echo "$ac_t""found" 1>&6 + else + echo "$ac_t""not found" 1>&6 + { echo "configure: error: LAPACK library $withval not readable" 1>&2; exit 1; } + fi + cat >> confdefs.h <<\EOF +#define HAVE_LIBLAPACK 1 +EOF + + LIBS="$withval $LIBS"; + fi + +else + echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6 +echo "configure:2356: checking for dgels_ in -llapack" >&5 +ac_lib_var=`echo lapack'_'dgels_ | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-llapack $LIBS" +cat > conftest.$ac_ext < - int main() { - - double d=0; - isnan (d); - +dgels_() ; return 0; } EOF -if { (eval echo configure:2341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - - deal_II_isnan_flag="-DHAVE_ISNAN $testflag" - break; - + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" - cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo lapack | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h < - -int main() { + LIBS="-llapack $LIBS" - double d=0; - _isnan (d); - -; return 0; } -EOF -if { (eval echo configure:2366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" - break; - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$ac_t""no" 1>&6 +$LIBS fi -rm -f conftest* - done - if test "x$deal_II_isnan_flag" = "x" ; then - echo "$ac_t""no." 1>&6 - else - echo "$ac_t""using $testflag" 1>&6 - CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" - fi - fi - echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:2388: 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' -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 +fi - CXXFLAGS=$CXXFLAGSO - deal_II_isnan_flag="" - cat > conftest.$ac_ext < - -int main() { - double d=0; - isnan (d); - -; return 0; } -EOF -if { (eval echo configure:2411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t"""yes"" 1>&6 - deal_II_isnan_flag="-DHAVE_ISNAN" - CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" - +# Check whether --enable-multigrid or --disable-multigrid was given. +if test "${enable_multigrid+set}" = set; then + enableval="$enable_multigrid" + enablemultigrid=$enableval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + if test -r deal.II/source/multigrid ; then + enablemultigrid=yes ; + else + enablemultigrid=no ; + fi fi -rm -f conftest* +if test "$enablemultigrid" = yes ; then + echo "$ac_t""configuring multigrid" 1>&6 + cat >> confdefs.h <<\EOF +#define ENABLE_MULTIGRID 1 +EOF - if test "x$deal_II_isnan_flag" = "x" ; then - cat > conftest.$ac_ext < - -int main() { - double d=0; - _isnan (d); - -; return 0; } -EOF -if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t"""yes"" 1>&6 - deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN" - CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" - + + + + +# Check whether --with-kdoc or --without-kdoc was given. +if test "${with_kdoc+set}" = set; then + withval="$with_kdoc" + kdocdir=$withval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + kdocdir=${DEAL2_DIR}/contrib/kdoc/bin fi -rm -f conftest* + +echo $ac_n "checking for kdoc""... $ac_c" 1>&6 +echo "configure:2445: 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 + else + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Invalid kdoc path $kdocdir/kdoc" 1>&2; exit 1; } fi + if test -r "$kdocdir/Version" ; then + kdocversion=`cat $kdocdir/Version` ; + else + kdocversion=1; + fi +else + kdocversion=`cat ${DEAL2_DIR}/contrib/kdoc/src/Version` + echo "$ac_t""using default version $kdocversion" 1>&6 +fi - if test "x$deal_II_isnan_flag" = "x" ; then - deal_II_isnan_flag="" - for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do - CXXFLAGS="$CXXFLAGSO $testflag" - cat > conftest.$ac_ext < - -int main() { - double d=0; - isnan (d); - -; return 0; } -EOF -if { (eval echo configure:2471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - deal_II_isnan_flag="-DHAVE_ISNAN $testflag" - break; - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - cat > conftest.$ac_ext < - -int main() { - double d=0; - _isnan (d); - -; return 0; } -EOF -if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag" - break; - +# Check whether --with-docxx or --without-docxx was given. +if test "${with_docxx+set}" = set; then + withval="$with_docxx" + docxx=$withval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + docxx=to-be-determined fi -rm -f conftest* - done - if test "x$deal_II_isnan_flag" = "x" ; then - echo "$ac_t""no." 1>&6 - else - echo "$ac_t""using $testflag" 1>&6 - CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" +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:2481: 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 + case "$docxx" in + /*) + ac_cv_path_docxx="$docxx" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_docxx="$docxx" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_docxx="$ac_dir/$ac_word" + break fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +docxx="$ac_cv_path_docxx" +if test -n "$docxx"; then + echo "$ac_t""$docxx" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + echo $ac_n "checking for doc++""... $ac_c" 1>&6 +echo "configure:2515: checking for doc++" >&5 + if test -x "$docxx" ; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + docxx= fi +fi @@ -2527,16 +2534,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:2531: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:2538: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2554,16 +2561,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:2558: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:2565: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2715,14 +2722,14 @@ s%@CXX@%$CXX%g s%@GXX_VERSION@%$GXX_VERSION%g s%@CXXFLAGSG@%$CXXFLAGSG%g s%@CXXFLAGSO@%$CXXFLAGSO%g +s%@enablemultithreading@%$enablemultithreading%g +s%@withmultithreading@%$withmultithreading%g s%@F77@%$F77%g s%@F77_VERSION@%$F77_VERSION%g s%@F77FLAGSO@%$F77FLAGSO%g s%@F77FLAGSG@%$F77FLAGSG%g s%@F77LDFLAGS@%$F77LDFLAGS%g s%@PERL@%$PERL%g -s%@enablemultithreading@%$enablemultithreading%g -s%@withmultithreading@%$withmultithreading%g s%@USE_CONTRIB_HSL@%$USE_CONTRIB_HSL%g s%@enablemultigrid@%$enablemultigrid%g s%@kdocdir@%$kdocdir%g diff --git a/deal.II/configure.in b/deal.II/configure.in index e290a3b6a4..5374e926ce 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -325,6 +325,87 @@ DEAL_II_HAVE_STD_ITERATOR dnl See whether we have to declare lrand48 ourselves with -ansi DEAL_II_HAVE_LRAND48_DECLARED +dnl See whether getrusage() is declared properly +DEAL_II_CHECK_GETRUSAGE + +dnl Likewise for isnan() +DEAL_II_CHECK_ISNAN + + + + + +dnl ------------------------------------------------------------- +dnl Multithreading +dnl ------------------------------------------------------------- + +dnl Test whether multithreading support is requested. This +dnl does not tell deal.II to actually use it, but the +dnl compiler flags are set to allow for it, +AC_ARG_ENABLE(multithreading, +[ --enable-multithreading Set compiler flags to allow for multithreaded programs], + enablemultithreading=$enableval, + enablemultithreading=no) +AC_SUBST(enablemultithreading) + + +dnl Adjust compiler parameters if multithreading is desired: +dnl - Use the right -threads/-pthread/-mthread option +dnl - Set preprocessor directives if necessary +dnl - __USE_MALLOC tells gcc to use thread safe STL allocators +dnl - _REENTRANT is a flag that is used in the standard UNIX +dnl headers to make reentrant functions (with suffix _r) declared +dnl - remove -ansi from compiler flags again, since ACE yields hundreds of +dnl error messages with this flag +if test "$enablemultithreading" = yes ; then + if test "$GXX" = yes ; then + DEAL_II_GET_THREAD_FLAGS + DEAL_II_THREAD_CPPFLAGS + + AC_DEFINE(__USE_MALLOC) + AC_DEFINE(_REENTRANT) + + CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`" + else + if test "x$GXX_VERSION" = "xibm_xlc" ; then + CXXFLAGSG = "$CXXFLAGSG -threaded" + CXXFLAGSO = "$CXXFLAGSO -threaded" + else + dnl Other compiler + AC_MSG_ERROR(No threading compiler options for this C++ compiler + specified at present) + exit 1 + fi + fi +fi + + + +dnl Test whether the user wants the multithread code in the +dnl library to be used +AC_ARG_WITH(multithreading, +[ --with-multithreading=DIR use DIR as path to the ACE library], + withmultithreading=$withval, + withmultithreading=no) +if test "$withmultithreading" != no ; then + AC_MSG_CHECKING(for ACE) + if test -d "$withmultithreading" ; then + AC_MSG_RESULT(found) + else + AC_MSG_RESULT(not found) + AC_MSG_ERROR(Invalid ACE path) + fi + + AC_DEFINE(DEAL_II_USE_MT) +fi +AC_SUBST(withmultithreading) + + + + + + + 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 @@ -480,73 +561,6 @@ AC_SUBST(PERL) -dnl ------------------------------------------------------------- -dnl Multithreading -dnl ------------------------------------------------------------- - -dnl Test whether multithreading support is requested. This -dnl does not tell deal.II to actually use it, but the -dnl compiler flags are set to allow for it, -AC_ARG_ENABLE(multithreading, -[ --enable-multithreading Set compiler flags to allow for multithreaded programs], - enablemultithreading=$enableval, - enablemultithreading=no) -AC_SUBST(enablemultithreading) - - -dnl Adjust compiler parameters if multithreading is desired: -dnl - Use the right -threads/-pthread/-mthread option -dnl - Set preprocessor directives if necessary -dnl - __USE_MALLOC tells gcc to use thread safe STL allocators -dnl - _REENTRANT is a flag that is used in the standard UNIX -dnl headers to make reentrant functions (with suffix _r) declared -dnl - remove -ansi from compiler flags again, since ACE yields hundreds of -dnl error messages with this flag -if test "$enablemultithreading" = yes ; then - if test "$GXX" = yes ; then - DEAL_II_GET_THREAD_FLAGS - DEAL_II_THREAD_CPPFLAGS - - AC_DEFINE(__USE_MALLOC) - AC_DEFINE(_REENTRANT) - - CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`" - else - if test "x$GXX_VERSION" = "xibm_xlc" ; then - CXXFLAGSG = "$CXXFLAGSG -threaded" - CXXFLAGSO = "$CXXFLAGSO -threaded" - else - dnl Other compiler - AC_MSG_ERROR(No threading compiler options for this C++ compiler - specified at present) - exit 1 - fi - fi -fi - - - -dnl Test whether the user wants the multithread code in the -dnl library to be used -AC_ARG_WITH(multithreading, -[ --with-multithreading=DIR use DIR as path to the ACE library], - withmultithreading=$withval, - withmultithreading=no) -if test "$withmultithreading" != no ; then - AC_MSG_CHECKING(for ACE) - if test -d "$withmultithreading" ; then - AC_MSG_RESULT(found) - else - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Invalid ACE path) - fi - - AC_DEFINE(DEAL_II_USE_MT) -fi -AC_SUBST(withmultithreading) - - - dnl ------------------------------------------------------------ dnl Check whether some of the HSL functions have been dropped dnl into their respective place in the contrib subdir. @@ -697,15 +711,6 @@ AC_SUBST(docxx) -dnl ------------------------------------------------------------- -dnl Check for specific machine types and other checks -dnl ------------------------------------------------------------- - -DEAL_II_CHECK_GETRUSAGE -DEAL_II_CHECK_ISNAN - - - dnl ------------------------------------------------------------- dnl Last check: test whether CXXFLAGS and F77FLAGS are ok -- 2.39.5