Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sct
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dkrz-sw
sct
Commits
507fb593
Commit
507fb593
authored
5 years ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
Replace AC_FC_PP_SRCEXT with ACX_FC_PP_SRCEXT to account for Cray's '-e T'.
parent
0b8f96f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.ac
+3
-1
3 additions, 1 deletion
configure.ac
m4/acx_fc_pp.m4
+90
-0
90 additions, 0 deletions
m4/acx_fc_pp.m4
with
93 additions
and
1 deletion
configure.ac
+
3
−
1
View file @
507fb593
...
...
@@ -248,7 +248,9 @@ main(int argc, char **argv)
AM_CONDITIONAL([MPICHECK], [test x"$with_mpirun_check" != xfalse])
AC_FC_PP_SRCEXT([f90])
AC_LANG_PUSH([Fortran])
ACX_FC_PP_SRCEXT([f90])
AC_LANG_POP([Fortran])
AC_FC_PP_DEFINE
# Set FCDEFS and adjust -D flag if needed.
...
...
This diff is collapsed.
Click to expand it.
m4/acx_fc_pp.m4
0 → 100644
+
90
−
0
View file @
507fb593
# ACX_FC_PP_SRCEXT(EXTENSION,
# [ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# -----------------------------------------------------------------------------
# Originally taken from the master branch of Autoconf where it is known as
# AC_FC_PP_SRCEXT.
# -----------------------------------------------------------------------------
# Finds the Fortran compiler flag needed to enable Fortran preprocessing for
# source files with extension EXTENSION. The result is either "unknown",
# or the actual compiler flag required to enable Fortran preprocessing, which
# may be an empty string.
#
# If successful, sets the output variable FCFLAGS_[]EXTENSION and the shell
# variable ac_fcflags_srcext to the result, sets the shell variables
# ac_fc_srcext and ac_ext to the EXTENSION, and runs ACTION-IF-SUCCESS;
# otherwise sets the output variable FCFLAGS_[]EXTENSION and the shell variable
# ac_fcflags_srcext to empty strings, keeps the shell variables ac_fc_srcext
# and ac_ext unchanged, and runs ACTION-IF-FAILURE (defaults to failing with an
# error message).
#
# The flag is cached in the acx_cv_fc_pp_srcext_[]EXTENSION, which may contain
# whitespaces.
#
# Known flags:
# gfortran: -cpp
# SGI: -ftpp
# SUN: -xpp={fpp,cpp}
# IBM: -qsuffix=cpp=EXTENSION
# HP: +cpp
# PGI: -Mpreprocess
# Absoft: -cpp
# Cray: -e T, -e Z
# Intel: -fpp (-Tf may also be needed right before the source file name)
# PathScale: -ftpp, -cpp
# Lahey: -Cpp
# NAGWare: -fpp
# Compaq/Tru64: -cpp
# f2c: -cpp
# g95: -cpp
#
AC_DEFUN([ACX_FC_PP_SRCEXT],
[m4_provide([AC_FC_PP_SRCEXT])dnl
AC_LANG_ASSERT([Fortran])dnl
m4_pushdef([acx_cache_var], [acx_cv_fc_pp_srcext_$1])dnl
AC_MSG_CHECKING([for Fortran compiler flag needed to compile dnl
preprocessed .$1 files])
AS_VAR_SET_IF([acx_cache_var],
[AS_ECHO_N(["(cached) "]) >&AS_MESSAGE_FD],
[acx_cache_var=unknown
acx_ext_save=$ac_ext
acx_fcflags_srcext_save=$ac_fcflags_srcext
ac_ext=$1
AS_CASE([$acx_fc_pp_srcext_ext],
[[[fF]]77], [acx_fc_pp_srcext_try=f77-cpp-input],
[acx_fc_pp_srcext_try=f95-cpp-input])
for ac_fcflags_srcext in '' -ftpp -fpp -Tf '-fpp -Tf' -xpp=fpp dnl
-Mpreprocess '-e T' '-e Z' -cpp -xpp=cpp -qsuffix=cpp=$1 dnl
"-x $acx_fc_pp_srcext_try" +cpp -Cpp; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[#if 0
#include <ac_nonexistent.h>
choke me
#endif]])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[#if 1
#include <ac_nonexistent.h>
choke me
#endif]])],
[],
[acx_cache_var=$ac_fcflags_srcext])])
test "x$acx_cache_var" != xunknown && break
done
ac_fcflags_srcext=$acx_fcflags_srcext_save
ac_ext=$acx_ext_save])
AS_IF([test -n "$acx_cache_var"],
[AC_MSG_RESULT([$acx_cache_var])],
[AC_MSG_RESULT([none needed])])
AC_SUBST([FCFLAGS_][$1])
AS_VAR_IF([acx_cache_var], [unknown],
[ac_fcflags_srcext=
AS_VAR_COPY([FCFLAGS_][$1], [ac_fcflags_srcext])
m4_default([$3],
[AC_MSG_FAILURE([unable to detect Fortran compiler flag needed to dnl
compile preprocessed .$1 files])])],
[ac_fcflags_srcext=$acx_cache_var
AS_VAR_COPY([FCFLAGS_][$1], [ac_fcflags_srcext])
ac_fc_srcext=$1
AS_VAR_COPY([ac_ext], [ac_fc_srcext])
$2])
m4_popdef([acx_cache_var])])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment