Skip to content
Snippets Groups Projects
Commit 4cc2b7a5 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Account for Cray compiler.

parent 39ff54ac
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,9 @@ AC_FC_LINE_LENGTH
AC_FC_MODULE_FLAG
# Find out the Fortran module file extension.
AC_FC_MODULE_EXTENSION
# Find out whether the names of the Fortran module files are in uppercase.
AX_FC_MODULE_UPPERCASE
AM_CONDITIONAL([FC_MODUPPERCASE], [test x"$FC_MODUPPERCASE" = xyes])
# check for Fortran 2003 standard options
AX_FC_STD2003([fortran_interface=true],
[AC_MSG_WARN([Fortran compiler does not support ISO_C_BINDING ... suppress building Fortran interface])
......
# AX_FC_MODULE_UPPERCASE()
# -----------------------------------------------------------------------------
# Checks whether the Fortran module files have uppercase names. The result is
# "yes", "no" or "unknown".
#
# The result is stored in the FC_MODUPPERCASE output variable and is cached in
# the ax_cv_fc_module_uppercase variable.
#
AC_DEFUN([AX_FC_MODULE_UPPERCASE],
[AC_CACHE_CHECK([whether Fortran 90 modules files get uppercase names],
[ax_cv_fc_module_uppercase],
[ax_cv_fc_module_uppercase=unknown
AS_MKDIR_P([conftest.dir])
cd conftest.dir
AC_LANG_PUSH([Fortran])
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[[ module conftest_module
contains
subroutine conftest_routine
end subroutine
end module]])],
[AS_IF([test -f CONFTEST_MODULE.*], [ax_cv_fc_module_uppercase=yes],
[test -f conftest_module.*], [ax_cv_fc_module_uppercase=no])])
AC_LANG_POP([Fortran])
cd ..
rm -rf conftest.dir])
AC_SUBST([FC_MODUPPERCASE], [$ax_cv_fc_module_uppercase])])
sct.h
sct.mod
SCT.mod
sct.i
pkgconfig/sct.pc
......@@ -16,14 +16,21 @@ nodist_include_HEADERS = sct.h
BUILT_SOURCES = sct.h
libsct_la_SOURCES = sct_collector.c sct_f2c.c sct_mach.c sct_reduce.c sct_reporter.c sct_mergesort.c
if FORTRAN_INTERFACE
libsct_la_SOURCES = sct_collector.c sct_f2c.c sct_mach.c sct_reduce.c sct_reporter.c sct_mergesort.c sct.f90
nodist_include_HEADERS += sct.mod
libsct_la_SOURCES += sct.f90
if FC_MODUPPERCASE
sct_mod = SCT.$(FC_MODEXT)
else
libsct_la_SOURCES = sct_collector.c sct_f2c.c sct_mach.c sct_reduce.c sct_reporter.c sct_mergesort.c
sct_mod = sct.$(FC_MODEXT)
endif
nodist_include_HEADERS += $(sct_mod)
endif
CLEANFILES = sct.h
CLEANFILES = sct.h sct.mod
# Clean Fortran module files and Cray's postprocessed files.
CLEANFILES += $(sct_mod) sct.i
EXTRA_DIST = $(header)
......@@ -35,7 +42,7 @@ else
$(top_srcdir)/util/gen_public_header.pl N_HAVE_MPI $(header)
endif
sct.mod: sct.o
$(sct_mod): sct.o
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig/sct.pc
sct.mod
SCT.mod
sct.i
......@@ -7,12 +7,19 @@ lib_LTLIBRARIES = libsct.la
if FORTRAN_INTERFACE
libsct_la_SOURCES = nosct.f90
nodist_include_HEADERS = sct.mod
if FC_MODUPPERCASE
sct_mod = SCT.$(FC_MODEXT)
else
sct_mod = sct.$(FC_MODEXT)
endif
nodist_include_HEADERS = $(sct_mod)
else
libsct_la_SOURCES =
nodist_include_HEADERS =
endif
sct.mod: nosct.o
$(sct_mod): nosct.o
# Clean Fortran module files and Cray's postprocessed files.
CLEANFILES = $(sct_mod) sct.i
CLEANFILES = sct.mod
*.log
*.trs
*.i
test_*_run
test_precision
test_sct
......
......@@ -92,7 +92,7 @@ endif
endif
endif
# Remove module files and hdf5 output upon make clean:
# Remove module files, Cray's postprocessed files and hdf5 output upon make clean:
clean-local:
test -z "$(FC_MODEXT)" || $(RM) *.$(FC_MODEXT)
$(RM) *.h5
$(RM) *.i *.h5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment