]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Allow selecting something different than gfortran by setting the F77 environment...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jun 2012 08:35:23 +0000 (08:35 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jun 2012 08:35:23 +0000 (08:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@25614 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/configure.in
deal.II/doc/news/changes.h

index 0d70c483b930f1c3acfcfedb2c9c3933c7b2cca2..995c3826f54cd892f44906c9319a3f678ef4f2b5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 25397 .
+# From configure.in Revision: 25492 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for deal.II 7.2.pre.
 #
@@ -9563,10 +9563,9 @@ $as_echo "" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ---------------- configuring F77 compilers ------------------" >&5
 $as_echo "---------------- configuring F77 compilers ------------------" >&6; }
 
-for ac_prog in gfortran f77 g77
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+if test "x$F77" = "x" ; then
+  # Extract the first word of "gfortran f77 g77", so it can be a program name with args.
+set dummy gfortran f77 g77; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_path_F77+:} false; then :
@@ -9605,8 +9604,48 @@ $as_echo "no" >&6; }
 fi
 
 
-  test -n "$F77" && break
+else
+  # Extract the first word of "$F77", so it can be a program name with args.
+set dummy $F77; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $F77 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_F77="$F77" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_F77="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+F77=$ac_cv_path_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
 
 
 if test "x$F77" != "x" ; then
index f2e3b1c4ddfe5748c13f34ce20bc8341e904140f..d513f5271b4ee923eda00ae4fb4714f4e0df3382 100644 (file)
@@ -279,7 +279,21 @@ dnl
 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).
-AC_PATH_PROGS(F77, [gfortran f77 g77])
+dnl
+dnl Note: While the autoconf documentation says that the AC_PATH_PROG
+dnl macro does nothing if the output variable (here: $F77) is already
+dnl set, this doesn't appear to be the case: if you set $F77 on the
+dnl command line, then it still finds /usr/bin/gfortran if gfortran
+dnl is listed first in the square brackets. Confusingly, it doesn't
+dnl find /usr/bin/gfortran if the order of things in square brackets
+dnl does *not* list gfortran first. Thus, explicitly test whether F77
+dnl is set and then short-circuit the process.
+if test "x$F77" = "x" ; then
+  AC_PATH_PROG(F77, [gfortran f77 g77])
+else
+  AC_PATH_PROG(F77, [$F77])
+fi
+
 
 dnl Next determine which f77 compiler we have here and set compilation
 dnl flags accordingly. Only do that if we have an F77 compiler at all.
index 433d9febb0567cf8db4a99c8a49aae618fb7d190..48cab3d81bb1a1dceee9c9be1b0adb772a86c6a6 100644 (file)
@@ -47,6 +47,13 @@ used for boundary indicators.
 
 
 <ol>
+<li>
+Fixed: Due to an apparent bug in autoconf, it was not possible to
+override the <code>F77</code> environment variable to select anything
+else than gfortran. This is now fixed.
+<br>
+(Wolfgang Bangerth, 2012/06/08)
+
 <li>
 New: step-43 is an extension of step-21 that shows efficient methods
 to solve multi-phase flow.

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.