fixed fortran compiler
[charm.git] / src / arch / mpi-linux-x86_64 / conv-mach.sh
index cb58afa555a388e2cd696eae817b6ad33494312e..3fced671119fab2cc47a954fac3b23b2dce63c1c 100644 (file)
@@ -42,12 +42,27 @@ CMK_NATIVE_LDXX="g++ $CMK_AMD64 "
 CMK_NATIVE_LIBS=""
 
 # fortran compiler 
-CMK_CF77="f77"
-CMK_CF90="f90"
-CMK_F90LIBS="-L/usr/absoft/lib -L/opt/absoft/lib -lf90math -lfio -lU77 -lf77math "
-CMK_F77LIBS="-lg2c "
-CMK_F90_USE_MODDIR=1
-CMK_F90_MODINC="-p"
+CMK_CF90=`which f95 2>/dev/null`
+if test -n "$CMK_CF90"
+then
+#    CMK_FPP="/lib/cpp -P -CC"
+#    CMK_CF90="$CMK_CF90 -fpic -fautomatic -fdollar-ok "
+#    CMK_CF90_FIXED="$CMK_CF90 -ffixed-form "
+#    CMK_F90LIBS="-lgfortran "
+#    CMK_F90_USE_MODDIR=1
+#    CMK_F90_MODINC="-I"
+#    CMK_MOD_NAME_ALLCAPS=
+#    CMK_MOD_EXT="mod"
+    . $CHARMINC/conv-mach-gfortran.sh
+else
+    CMK_CF77="g77 "
+    CMK_CF90="f90 "
+    CMK_CF90_FIXED="$CMK_CF90 -W132 "
+    CMK_F90LIBS="-L/usr/absoft/lib -L/opt/absoft/lib -lf90math -lfio -lU77 -lf77math "
+    CMK_F77LIBS="-lg2c "
+    CMK_F90_USE_MODDIR=1
+    CMK_F90_MODINC="-p"
+fi
 
 CMK_QT='generic64'
 CMK_RANLIB="ranlib"