]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some Fortran checks and the like.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Jan 2001 08:32:03 +0000 (08:32 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Jan 2001 08:32:03 +0000 (08:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@3598 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/Make.global_options.in
deal.II/configure
deal.II/configure.in
deal.II/doc/development/Makefile
deal.II/doc/development/makefiles.1.html

index c16afd41ad85ab1e116e1f9d56427634b34834d5..911c08df1aa199d2e6b19c08b8185af8ef0f28c2 100644 (file)
@@ -23,6 +23,9 @@ CC                   = @CC@
 CXX                  = @CXX@
 GXX-VERSION          = @GXX_VERSION@
 LDFLAGS              = @LDFLAGS@
+F77                  = @F77@
+F77-VERSION          = @F77_VERSION@
+F77LDFLAGS           = @F77LDFLAGS@
 LIBS                 = @LIBS@
 PERL                 = @PERL@
 enable-multithreading= @enablemultithreading@
@@ -82,6 +85,10 @@ INCLUDE           += $(addprefix -I, $(include-path-base) \
 CXXFLAGS.g   = @DEFS@ @CXXFLAGSG@  $(INCLUDE)
 CXXFLAGS.o   = @DEFS@ @CXXFLAGSO@  $(INCLUDE)
 
+F77FLAGS.g   = @DEFS@ @F77FLAGSG@  $(INCLUDE)
+F77FLAGS.o   = @DEFS@ @F77FLAGSO@  $(INCLUDE)
+
+
 
 # if multithread support in the library is requested, then set the
 # respective flags
index 1e20ee12984a1a54489bc3dc967dac994946f806..05aa26b3caba2cd69d4dff2ab747f0160304a55e 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# From configure.in Revision: 1.41 
+# From configure.in Revision: 1.42 
 
 
 
@@ -1216,43 +1216,6 @@ 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:1223: 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 "$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
-fi
-PERL="$ac_cv_path_PERL"
-if test -n "$PERL"; then
-  echo "$ac_t""$PERL" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-
 
 
 if test $GXX = yes ; then
@@ -1301,12 +1264,19 @@ fi
 
 
 echo $ac_n "checking whether -ggdb works for long symbols""... $ac_c" 1>&6
-echo "configure:1305: checking whether -ggdb works for long symbols" >&5
+echo "configure:1268: checking whether -ggdb works for long symbols" >&5
 case "$target" in
       alpha*-osf*)
        CXXFLAGS="-ggdb $CXXFLAGSG"
+        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
+
        cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1280 "configure"
 #include "confdefs.h"
 
 #include <string>
@@ -1327,7 +1297,7 @@ int main() {
          
 ; return 0; }
 EOF
-if { (eval echo configure:1331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
             CXXFLAGSG="-ggdb $CXXFLAGSG"
@@ -1355,11 +1325,17 @@ esac
 
 
   echo $ac_n "checking whether AssertThrow works with debug flags""... $ac_c" 1>&6
-echo "configure:1359: checking whether AssertThrow works with debug flags" >&5
-  
+echo "configure:1329: 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'
+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 <<EOF
-#line 1363 "configure"
+#line 1339 "configure"
 #include "confdefs.h"
 
 #include "base/include/base/exceptions.h"
@@ -1370,7 +1346,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -1387,11 +1363,17 @@ fi
 rm -f conftest*
 
   echo $ac_n "checking whether AssertThrow works with optimized flags""... $ac_c" 1>&6
-echo "configure:1391: checking whether AssertThrow works with optimized flags" >&5
-  
+echo "configure:1367: 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'
+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
   cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
+#line 1377 "configure"
 #include "confdefs.h"
 
 #include "base/include/base/exceptions.h"
@@ -1402,7 +1384,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -1421,6 +1403,166 @@ 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:1410: 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
+
+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:1446: 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
+
+fi
+
+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"
+
+        if test "x$F77_VERSION" != "xegcs1.1" ; then
+    F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing"
+  fi
+
+        F77LDFLAGS=-lg2c
+
+else
+    F77_VERSION
+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:1531: 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 "$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
+fi
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+  echo "$ac_t""$PERL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+
+
 
 
 # Check whether --enable-multithreading or --disable-multithreading was given.
@@ -1437,7 +1579,7 @@ fi
 if test $enablemultithreading = yes ; then
   
   echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6
-echo "configure:1441: checking for platform specific thread flags" >&5
+echo "configure:1583: checking for platform specific thread flags" >&5
   
   for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do
     CXXFLAGS="$CXXFLAGSG -$i"
@@ -1473,10 +1615,16 @@ echo "configure:1441: checking for platform specific thread flags" >&5
 
   
   echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6
-echo "configure:1477: checking for platform specific multi-threading defines" >&5
-  
+echo "configure:1619: 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'
+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
+
   cat > conftest.$ac_ext <<EOF
-#line 1480 "configure"
+#line 1628 "configure"
 #include "confdefs.h"
 
 #if !defined (_REENTRANT) && !defined (_THREAD_SAFE)
@@ -1490,7 +1638,7 @@ int main() {
    
 ; return 0; }
 EOF
-if { (eval echo configure:1494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""not necessary"" 1>&6
@@ -1532,7 +1680,7 @@ fi
 
 if test $withmultithreading != no ; then
   echo $ac_n "checking for ACE""... $ac_c" 1>&6
-echo "configure:1536: checking for ACE" >&5
+echo "configure:1684: checking for ACE" >&5
   if test -d $withmultithreading ; then
     echo "$ac_t""found" 1>&6
   else
@@ -1552,7 +1700,7 @@ 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:1556: checking for BLAS" >&5
+echo "configure:1704: checking for BLAS" >&5
     if test -r $withval ; then
       echo "$ac_t""found" 1>&6
     else
@@ -1568,7 +1716,7 @@ EOF
   
 else
   echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6
-echo "configure:1572: checking for main in -lblas" >&5
+echo "configure:1720: 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
@@ -1576,14 +1724,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lblas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1580 "configure"
+#line 1728 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1615,7 +1763,7 @@ 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:1619: checking for LAPACK" >&5
+echo "configure:1767: checking for LAPACK" >&5
     if test -r $withval ; then
       echo "$ac_t""found" 1>&6
     else
@@ -1631,7 +1779,7 @@ EOF
   
 else
   echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6
-echo "configure:1635: checking for dgels_ in -llapack" >&5
+echo "configure:1783: 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
@@ -1639,7 +1787,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llapack  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1643 "configure"
+#line 1791 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -1653,7 +1801,7 @@ int main() {
 dgels_()
 ; return 0; }
 EOF
-if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1720,7 +1868,7 @@ else
 fi
 
 echo $ac_n "checking for kdoc""... $ac_c" 1>&6
-echo "configure:1724: checking for kdoc" >&5
+echo "configure:1872: 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
@@ -1756,7 +1904,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:1760: checking for $ac_word" >&5
+echo "configure:1908: 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
@@ -1790,7 +1938,7 @@ fi
 
 else
   echo $ac_n "checking for doc++""... $ac_c" 1>&6
-echo "configure:1794: checking for doc++" >&5
+echo "configure:1942: checking for doc++" >&5
   if test -x "$docxx" ; then
     echo "$ac_t""yes" 1>&6
   else
@@ -1805,7 +1953,7 @@ fi
 
 
   echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6
-echo "configure:1809: checking whether getrusage is properly declared" >&5
+echo "configure:1957: 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'
@@ -1813,9 +1961,8 @@ 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
 
-
   cat > conftest.$ac_ext <<EOF
-#line 1819 "configure"
+#line 1966 "configure"
 #include "confdefs.h"
 
 #include <sys/resource.h>
@@ -1827,7 +1974,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -1845,12 +1992,18 @@ fi
 rm -f conftest*
 
     echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6
-echo "configure:1849: checking whether isnan is declared with debug flags" >&5
-  
+echo "configure:1996: 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 <<EOF
-#line 1854 "configure"
+#line 2007 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1862,7 +2015,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -1878,7 +2031,7 @@ rm -f conftest*
 
   if test "x$deal_II_isnan_flag" = "x" ; then
             cat > conftest.$ac_ext <<EOF
-#line 1882 "configure"
+#line 2035 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1890,7 +2043,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
          echo "$ac_t"""yes"" 1>&6
@@ -1910,7 +2063,7 @@ rm -f conftest*
     for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
       CXXFLAGS="$CXXFLAGSG $testflag"
       cat > conftest.$ac_ext <<EOF
-#line 1914 "configure"
+#line 2067 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1922,7 +2075,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
@@ -1935,7 +2088,7 @@ fi
 rm -f conftest*
 
                         cat > conftest.$ac_ext <<EOF
-#line 1939 "configure"
+#line 2092 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1947,7 +2100,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:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag"
@@ -1969,12 +2122,18 @@ rm -f conftest*
   fi
 
     echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
-echo "configure:1973: checking whether isnan is declared with optimized flags" >&5
-  
+echo "configure:2126: 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 <<EOF
-#line 1978 "configure"
+#line 2137 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -1986,7 +2145,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:1990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
        echo "$ac_t"""yes"" 1>&6
@@ -2002,7 +2161,7 @@ rm -f conftest*
 
   if test "x$deal_II_isnan_flag" = "x" ; then
             cat > conftest.$ac_ext <<EOF
-#line 2006 "configure"
+#line 2165 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2014,7 +2173,7 @@ int main() {
       
 ; return 0; }
 EOF
-if { (eval echo configure:2018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
          echo "$ac_t"""yes"" 1>&6
@@ -2034,7 +2193,7 @@ rm -f conftest*
     for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do 
       CXXFLAGS="$CXXFLAGSO $testflag"
       cat > conftest.$ac_ext <<EOF
-#line 2038 "configure"
+#line 2197 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2046,7 +2205,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_ISNAN $testflag"
@@ -2059,7 +2218,7 @@ fi
 rm -f conftest*
 
                         cat > conftest.$ac_ext <<EOF
-#line 2063 "configure"
+#line 2222 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -2071,7 +2230,7 @@ int main() {
        
 ; return 0; }
 EOF
-if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
                          deal_II_isnan_flag="-DHAVE_UNDERSCORE_ISNAN $testflag"
@@ -2097,18 +2256,25 @@ rm -f conftest*
 
 
 
+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 consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:2103: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:2269: checking for consistency of CXXFLAGSG flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2105 "configure"
+#line 2271 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:2112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -2126,16 +2292,16 @@ rm -f conftest*
 
 CXXFLAGS="$CXXFLAGSO"
 echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:2130: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:2296: checking for consistency of CXXFLAGSO flags" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2132 "configure"
+#line 2298 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:2139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -2154,6 +2320,8 @@ rm -f conftest*
 
 
 
+
+
 subdirs="tests contrib"
 
 
@@ -2283,9 +2451,14 @@ s%@lib_suffix@%$lib_suffix%g
 s%@CC@%$CC%g
 s%@CXX@%$CXX%g
 s%@GXX_VERSION@%$GXX_VERSION%g
-s%@PERL@%$PERL%g
 s%@CXXFLAGSG@%$CXXFLAGSG%g
 s%@CXXFLAGSO@%$CXXFLAGSO%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%@enablemultigrid@%$enablemultigrid%g
index 9b44edc7b50efd760bfdadc0f74eb8886379a901..3bc84b804f94b15364d9615c5e1a0d5d73b8b878 100644 (file)
@@ -149,10 +149,6 @@ AC_SUBST(GXX_VERSION)
 
 
 
-dnl    Find path to perl
-AC_PATH_PROG(PERL, perl)
-
-
 
 dnl -------------------------------------------------------------
 dnl Set compiler flags to their default values. They will be 
@@ -235,6 +231,7 @@ case "$target" in
    dnl On Alpha, use the special treatment
    alpha*-osf*)
        CXXFLAGS="-ggdb $CXXFLAGSG"
+        AC_LANG_CPLUSPLUS
        AC_TRY_COMPILE(
          [
 #include <string>
@@ -285,6 +282,90 @@ DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO, CXXFLAGSO="-DDISABLE_ASSERT_TH
 
 
 
+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
+dnl compilers are much better adapted to the system at hand, and since
+dnl Fortran code is often used for efficiency reasons, this is
+dnl important. Likewise, if external Fortran code is imported, it is
+dnl usually code that is well tested and does not need much debugging, so
+dnl good optimizations are helpful again.
+AC_PATH_PROG(F77,f77)
+if test "x$F77" = "x" ; then
+    dnl Could not find an executable names `f77'. Try `g77'
+    AC_PATH_PROG(F77,g77)
+fi
+dnl It is possible that no Fortran 77 compiler was found. Don't care,
+dnl it may be that we don't need one (but we check below, when we must
+dnl have it).
+
+dnl Next try to find out something about the name and version of the compiler
+F77_VERSION_STRING=`($F77 -v 2>&1)`
+if test -n "`echo $F77_VERSION_STRING | grep \"GNU F77\"`" ; then
+  dnl Yes, this is a GNU g77 version. find out the right version
+  G77_VERSION_STRING="`($F77 -v 2>&1) | grep \"gcc version\"`"
+  case "$G77_VERSION_STRING" in
+    *"egcs-1.1"*)
+       AC_MSG_RESULT(compiler is egcs-1.1)
+       F77_VERSION=egcs1.1
+       ;;
+    *2.95*)
+       AC_MSG_RESULT(compiler is gcc-2.95)
+       F77_VERSION=gcc2.95
+       ;;
+    *2.96*)
+       AC_MSG_RESULT(compiler is gcc-2.96)
+       F77_VERSION=gcc2.96
+       ;;
+    *2.97*)
+       AC_MSG_RESULT(compiler is gcc-2.97)
+       F77_VERSION=gcc2.97
+       ;;
+    *2.4* | *2.5* | *2.6* | *2.7* | *2.8*)
+       dnl These compilers are too old to support a useful subset
+       dnl of modern C++, so we don't support them
+       AC_MSG_RESULT(compiler is $G77_VERSION_STRING)
+       AC_MSG_ERROR(compiler is not supported)
+       ;;
+    *)
+       AC_MSG_RESULT(compiler is unknown but accepted gcc version)
+       F77_VERSION=other
+       ;;
+  esac
+
+  dnl For g77 versions, it is simple which flags to use since we already
+  dnl know them mostly from the C++ compiler
+  F77FLAGSG="$FFLAGS -ggdb -DDEBUG -pedantic -W -Wall"
+  F77FLAGSO="$FFLAGS -O2"
+
+  dnl Some flags can only be set for some compilers as others either
+  dnl did not accept them or were buggy on them (see the explanation
+  dnl for CXXFLAGS for an explanation of some of these cases)
+  if test "x$F77_VERSION" != "xegcs1.1" ; then
+    F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing"
+  fi
+
+  dnl Then we have to set the set of libraries we have to link with
+  dnl when linking C++ and Fortran code with the C++ compiler. For
+  dnl g77, this is only libg2c
+  F77LDFLAGS=-lg2c
+
+else
+  dnl No GNU g77 version, something else. Don't set anything
+  F77_VERSION
+fi
+AC_SUBST(F77_VERSION)
+AC_SUBST(F77FLAGSO)
+AC_SUBST(F77FLAGSG)
+AC_SUBST(F77LDFLAGS)
+
+
+dnl    Find path to perl
+AC_PATH_PROG(PERL, perl)
+AC_SUBST(PERL)
+
+
+
 
 dnl -------------------------------------------------------------
 dnl Multithreading
@@ -469,8 +550,9 @@ DEAL_II_CHECK_ISNAN
 
 
 dnl -------------------------------------------------------------
-dnl Last check: test whether CXXFLAGS are ok
+dnl Last check: test whether CXXFLAGS and F77FLAGS are ok
 dnl -------------------------------------------------------------
+AC_LANG_CPLUSPLUS
 CXXFLAGS="$CXXFLAGSG"
 AC_MSG_CHECKING(for consistency of CXXFLAGSG flags)
 AC_TRY_COMPILE(
@@ -498,6 +580,38 @@ AC_TRY_COMPILE(
   ])
 
 
+dnl     Err, well -- we'd like to have checked these flags, but autoconf
+dnl     has a problem here: when writing the compile file, a newline is
+dnl     missing, leading to an error when executing ./configure. So:
+dnl     while this is not fixed in autoconf, disable the respective tests
+dnl AC_LANG_FORTRAN77
+dnl FFLAGS="$F77FLAGSG"
+dnl AC_MSG_CHECKING(for consistency of F77FLAGSG flags)
+dnl AC_TRY_COMPILE(
+dnl   [],
+dnl   [],
+dnl   [
+dnl     AC_MSG_RESULT(yes)
+dnl   ],
+dnl   [
+dnl     AC_MSG_ERROR(invalid combination of flags!)
+dnl     exit 1;
+dnl   ])
+dnl 
+dnl FFLAGS="$F77FLAGSO"
+dnl AC_MSG_CHECKING(for consistency of F77FLAGSO flags)
+dnl AC_TRY_COMPILE(
+dnl   [],
+dnl   [],
+dnl   [
+dnl     AC_MSG_RESULT(yes)
+dnl   ],
+dnl   [
+dnl     AC_MSG_ERROR(invalid combination of flags!)
+dnl     exit 1;
+dnl   ])
+
+
 
 dnl -------------------------------------------------------------
 dnl Configure other packages
index 943b99f7a5686d1f72d4f299c8a1a2dc1fff5b33..30f9c89ccb120b4ab42896c5b0dd8c2fb447e129 100644 (file)
@@ -14,6 +14,8 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
        @echo '<li><code>CXX=$(CXX)</code>' >> $@
        @echo '<li><code>CC=$(CC)</code>' >> $@
        @echo '<li><code>GXX-VERSION=$(GXX-VERSION)</code>' >> $@
+       @echo '<li><code>F77=$(F77)</code>' >> $@
+       @echo '<li><code>F77-VERSION=$(F77-VERSION)</code>' >> $@
        @echo '<li><code>PERL=$(PERL)</code>' >> $@
        @echo '<li><code>DEAL_II_MAJOR=$(DEAL_II_MAJOR)</code>' >> $@
        @echo '<li><code>DEAL_II_MINOR=$(DEAL_II_MINOR)</code>' >> $@
@@ -37,7 +39,10 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
        @echo '<li><code>INCLUDE=$(INCLUDE)</code>' >> $@
        @echo '<li><code>CXXFLAGS.g=$(CXXFLAGS.g)</code>' >> $@
        @echo '<li><code>CXXFLAGS.o=$(CXXFLAGS.o)</code>' >> $@
+       @echo '<li><code>F77FLAGS.g=$(F77FLAGS.g)</code>' >> $@
+       @echo '<li><code>F77FLAGS.o=$(F77FLAGS.o)</code>' >> $@
        @echo '<li><code>LDFLAGS=$(LDFLAGS)</code>' >> $@
+       @echo '<li><code>F77LDFLAGS=$(F77LDFLAGS)</code>' >> $@
        @echo '<li><code>LIBS=$(LIBS)</code>' >> $@
        @echo '<li><code>ACE_ROOT=$(ACE_ROOT)</code>' >> $@
        @echo '<li><code>lib-ACE=$(lib-ACE)</code>' >> $@
index e199f69570b7bb7c94c7670356dcbdee868794d6..ca5c20636dd2ffb61e36c3b96aa0bf1fa0898e5f 100644 (file)
 
       <dt> <code>GXX-VERSION</code> </dt>
       <dd> <p>
-           Version of the GNU C++ compiler if that is used
+           Version of the GNU C++ compiler if that is used. Possible
+          names presently include <code>egcs1.1</code>,
+          <code>gcc2.95</code>, <code>gcc2.96</code>, and <code>gcc2.97</code>
+           </p>
+      </dd>
+
+
+      <dt> <code>F77</code> </dt>
+      <dd> <p>
+           Executable name of the F77 compiler; often, no Fortran
+           compiler is needed, in which case the variable may be empty if
+           none was found
+           </p>
+      </dd>
+
+
+      <dt> <code>F77-VERSION</code> </dt>
+      <dd> <p>
+           Name and version of the Fortran 77 compiler. Possible
+          names presently include <code>egcs1.1</code>,
+          <code>gcc2.95</code>, <code>gcc2.96</code>, and <code>gcc2.97</code>
            </p>
       </dd>
 
     <dl>
       <dt> <code>CXXFLAGS.g</code> </dt>
       <dd> <p>
-           Compiler flags for debug mode
+           C++ compiler flags for debug mode
            </p>
       </dd>
 
 
       <dt> <code>CXXFLAGS.o</code> </dt>
       <dd> <p>
-           Compiler flags for optimized mode
+           C++ compiler flags for optimized mode
+           </p>
+      </dd>
+
+      <dt> <code>F77FLAGS.g</code> </dt>
+      <dd> <p>
+           Fortran 77 compiler flags for debug mode
+           </p>
+      </dd>
+
+
+      <dt> <code>F77FLAGS.o</code> </dt>
+      <dd> <p>
+           Fortran 77 compiler flags for optimized mode
            </p>
       </dd>
     </dl>
            </p>
       </dd>
 
+      <dt> <code>F77LDFLAGS</code> </dt>
+      <dd> <p>
+           Linker flags when linking Fortran 77 code into the
+           executable where the main part is C++. This includes
+           libraries as <code>libg2c</code> for g77, or vendor libraries
+           </p>
+      </dd>
+
+
       <dt> <code>LIBS</code> </dt>
       <dd> <p>
-           Additional libraries found by configure
+           Additional libraries found by configure and needed to be
+           linked with based on the flags given to
+           <code>./configure</code>, e.g. BLAS or LAPACK
            </p>
       </dd>
     </dl>
 
+
     <li><h4>Variables in multithreading mode</h4>
  
     <p>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.