-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3cfce56
commit c870226
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
dnl T8_CHECK_FORTRAN | ||
dnl This functions checks some properties of Fortran modules and | ||
dnl whether specific directory for the Fortran module files has been specified or not. | ||
dnl | ||
dnl A directory may be specified by the option --with-moddir=<directory_path> | ||
dnl This option is only of relevance if the option --enable-fortran has been chosen, | ||
dnl since only in this case Fortran codes will be compiled | ||
dnl | ||
AC_DEFUN([T8_CHECK_FORTRAN], [ | ||
dnl Check if a directory has been specified which will hold the module files | ||
T8_ARG_WITH([moddir], | ||
[if Fortran modules will be built, this option specifies an explicit directory which should hold the module files (use --with-moddir=<desired/path/for/modules>)], | ||
[MODDIR]) | ||
dnl If Fortran is enabled | ||
if test "x$T8_ENABLE_FORTRAN" != xno ; then | ||
dnl Check the properties of Fortran modules (after the Fortran Compiler has been found by MPI_ENGAGE) | ||
AC_FC_MODULE_EXTENSION | ||
AC_FC_MODULE_FLAG | ||
AC_FC_MODULE_OUTPUT_FLAG | ||
if test "x$T8_WITH_MODDIR" = xyes ; then | ||
dnl The option is given without a directory | ||
AC_MSG_ERROR([missing directory path for the module directory]) | ||
elif test "x$T8_WITH_MODDIR" != xno ; then | ||
AC_MSG_NOTICE([we have set a module dir var]) | ||
dnl Substitute the variable in the makefile | ||
AC_SUBST(T8_FORTRAN_MODULE_DIR, $T8_WITH_MODDIR) | ||
fi | ||
fi | ||
]) |