Commit 36590268 authored by Ron Rahaman's avatar Ron Rahaman
Browse files

WIP: Working check for default real 8 flag

parent b02e7ba7
......@@ -80,10 +80,34 @@ AC_F77_LIBRARY_LDFLAGS # Determine -l and -L flags, append to $FLIBS
AC_F77_WRAPPERS # Discover how to call F77 funcs from C, set F77_FUNC macro. If underscore, then Nek needs -DUNDERSCORE
# Discover flags for Fortran preprocessing
FC_temp="$F77"; FC="$F77"
OLD_FC="$F77"; FC="$F77"
AC_FC_PP_SRCEXT([f]) # Discover what flags are needed to preprocess .f files
AC_FC_PP_DEFINE # Discover the flag (eg, -D, -Df) is used to define PP symbols
FC="$FC_temp"
FC="$OLD_FC"
###############################################################################
# FIND F77 FLAG FOR DEFAULT 8-BYTE FLOATS
###############################################################################
AC_LANG_PUSH([Fortran 77])
for flag in dnl
"-r8 -fpconstant" dnl Intel
"-r8" dnl PGI, some others
"-fdefault-real-8 -fdefault-double-8" dnl GNU
"-qrealsize=8 -qdpc=e" dnl IBM
"-s default64"; dnl Cray
do
OLD_FFLAGS="$FFLAGS"
FFLAGS="$flag"
AC_MSG_CHECKING([if Fortran 77 compiler accepts $flag])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM(, [[ real foo]],),
AC_MSG_RESULT([yes]) && break,
AC_MSG_RESULT([no])
)
done
AC_LANG_POP([Fortran 77])
FFLAGS="$OLD_FFLAGS"
###############################################################################
# SET NEK's PREPROCESSOR MACROS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment