test both g77 and f77
authorGengbin Zheng <gzheng@gzheng-desktop.(none)>
Fri, 12 Feb 2010 22:46:40 +0000 (16:46 -0600)
committerGengbin Zheng <gzheng@gzheng-desktop.(none)>
Fri, 12 Feb 2010 22:46:40 +0000 (16:46 -0600)
src/arch/net-linux/conv-mach.sh

index aae592bf8d1cbc6f406a999bf8a579cc1b05f787..7e4856bd53b0717b4e3710ab7cdd60fc33b1af17 100644 (file)
@@ -14,9 +14,17 @@ CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
 CMK_XIOPTS=""
 CMK_QT="i386-gcc"
 
-# fortran compiler Absoft or gnu f95
-CMK_CF77="g77 "
-CMK_F77LIBS="-lg2c "
+# fortran compiler f77 or gnu f95
+CMK_CF77=`which g77 2>/dev/null`
+if test -z "$CMK_CF77"
+then
+  CMK_CF77=`which f77 2>/dev/null`
+fi
+if test -n "$CMK_CF77"
+then
+  CMK_F77LIBS="-lg2c "
+fi
+
 CMK_CF90=`which f90 2>/dev/null`
 if test -n "$CMK_CF90"
 then