[MOAB-dev] r5221 - in MOAB/trunk: . config
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Mon Nov 21 14:47:07 CST 2011
Author: tautges
Date: 2011-11-21 14:47:07 -0600 (Mon, 21 Nov 2011)
New Revision: 5221
Modified:
MOAB/trunk/config/compiler.m4
MOAB/trunk/configure.ac
Log:
Fix compiling of Fortran code and automatic handling of proper compiler flags
in autoconf.
Modified: MOAB/trunk/config/compiler.m4
===================================================================
--- MOAB/trunk/config/compiler.m4 2011-11-18 18:47:06 UTC (rev 5220)
+++ MOAB/trunk/config/compiler.m4 2011-11-21 20:47:07 UTC (rev 5221)
@@ -155,6 +155,8 @@
# before setting up libtool so that it can override libtool settings.
CFLAGS="$USER_CFLAGS $FATHOM_CC_SPECIAL"
CXXFLAGS="$USER_CXXFLAGS $FATHOM_CXX_SPECIAL"
+FFLAGS="$USER_FFLAGS $FATHOM_F77_SPECIAL"
+FCFLAGS="$USER_FCFLAGS $FATHOM_FC_SPECIAL"
# On IBM/AIX, the check for OBJEXT fails for the mpcc compiler.
# (Comment out this hack, it should be fixed correctly now)
@@ -194,6 +196,11 @@
enable_fc_optimize=yes
fi
fi
+ if test "x$enable_f77_optimize" = "x"; then
+ if test "x$USER_FFLAGS" = "x"; then
+ enable_f77_optimize=yes
+ fi
+ fi
fi
# Choose compiler flags from CLI args
@@ -202,6 +209,7 @@
CXXFLAGS="$CXXFLAGS -g"
CFLAGS="$CFLAGS -g"
FCFLAGS="$FCFLAGS -g"
+ FFLAGS="$FFLAGS -g"
fi
if test "xyes" = "x$enable_cxx_optimize"; then
CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
@@ -212,6 +220,9 @@
if test "xyes" = "x$enable_fc_optimize"; then
FCFLAGS="$FCFLAGS -O2"
fi
+if test "xyes" = "x$enable_f77_optimize"; then
+ FFLAGS="$FFLAGS -O2"
+fi
# Check for 32/64 bit.
# This requires FATHOM_CXX_FLAGS and FATHOM_CC_FLAGS to have been called first
Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac 2011-11-18 18:47:06 UTC (rev 5220)
+++ MOAB/trunk/configure.ac 2011-11-21 20:47:07 UTC (rev 5221)
@@ -77,7 +77,7 @@
if test "xyes" = "x$ENABLE_FORTRAN" && test "x" != "x$FC"; then
More information about the moab-dev
mailing list