diff options
Diffstat (limited to 'lib/make/configure.in')
-rw-r--r-- | lib/make/configure.in | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/make/configure.in b/lib/make/configure.in index 380d9a1a..9484fc89 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -112,6 +112,22 @@ if test -n "$PROFILE" ; then fi +####################################################################### +# determine OPENMP_MODE from the OPENMP option +# if this option isn't set OPENMP_MODE will default to 'no' + +OPENMP_MODE='no' +if test -n "$OPENMP" ; then + changequote({, }) + OPENMP=`echo $OPENMP | tr '[:upper:]' '[:lower:]'` + changequote([, ]) + if test "$OPENMP" != 'yes' -a "$OPENMP" != 'no' ; then + AC_ERROR(Didn't recognize setting of OPENMP=\"$OPENMP\" (should be either \"yes\" or \"no\")) + fi + OPENMP_MODE=$OPENMP +fi + + dnl Check the system type AC_CANONICAL_HOST @@ -341,6 +357,15 @@ AC_SUBST(F77_PROFILE_FLAGS) AC_SUBST(F90_PROFILE_FLAGS) : ${F90_PROFILE_FLAGS='-pg'} + +# Set the OpenMP flags if they've not been set by now +AC_SUBST(OPENMP_MODE) + +AC_SUBST(C_OPENMP_FLAGS) +AC_SUBST(CXX_OPENMP_FLAGS) +AC_SUBST(F77_OPENMP_FLAGS) +AC_SUBST(F90_OPENMP_FLAGS) + ########################################################################## # Deal with the Fortran compiler issues. @@ -352,6 +377,7 @@ if test "x$F90" != "x" -a "x$F90" != "xnone" -a "x$F77" = "x" ; then F77_DEBUG_FLAGS=$F90_DEBUG_FLAGS F77_OPTIMISE_FLAGS=$F90_OPTIMISE_FLAGS F77_PROFILE_FLAGS=$F90_PROFILE_FLAGS + F77_OPENMP_FLAGS=$F90_OPENMP_FLAGS fi # Set default Fortran compilers |