autoconf: Fortran Compiler
1
1 5.10.8 Fortran Compiler Characteristics
1 ---------------------------------------
1
1 The Autoconf Fortran support is divided into two categories: legacy
1 Fortran 77 macros (`F77'), and modern Fortran macros (`FC'). The
1 former are intended for traditional Fortran 77 code, and have output
1 variables like `F77', `FFLAGS', and `FLIBS'. The latter are for newer
1 programs that can (or must) compile under the newer Fortran standards,
1 and have output variables like `FC', `FCFLAGS', and `FCLIBS'.
1
1 Except for the macros `AC_FC_SRCEXT', `AC_FC_FREEFORM',
1 `AC_FC_FIXEDFORM', and `AC_FC_LINE_LENGTH' (see below), the `FC' and
1 `F77' macros behave almost identically, and so they are documented
1 together in this section.
1
1 -- Macro: AC_PROG_F77 ([COMPILER-SEARCH-LIST])
1 Determine a Fortran 77 compiler to use. If `F77' is not already
1 set in the environment, then check for `g77' and `f77', and then
1 some other names. Set the output variable `F77' to the name of
1 the compiler found.
1
1 This macro may, however, be invoked with an optional first argument
1 which, if specified, must be a blank-separated list of Fortran 77
1 compilers to search for. This just gives the user an opportunity
1 to specify an alternative search list for the Fortran 77 compiler.
1 For example, if you didn't like the default order, then you could
1 invoke `AC_PROG_F77' like this:
1
1 AC_PROG_F77([fl32 f77 fort77 xlf g77 f90 xlf90])
1
1 If using `g77' (the GNU Fortran 77 compiler), then set the shell
1 variable `G77' to `yes'. If the output variable `FFLAGS' was not
1 already set in the environment, then set it to `-g -02' for `g77'
1 (or `-O2' where `g77' does not accept `-g'). Otherwise, set
1 `FFLAGS' to `-g' for all other Fortran 77 compilers.
1
1 The result of the GNU test is cached in the
1 `ac_cv_f77_compiler_gnu' variable, acceptance of `-g' in the
1 `ac_cv_prog_f77_g' variable.
1
1 -- Macro: AC_PROG_FC ([COMPILER-SEARCH-LIST], [DIALECT])
1 Determine a Fortran compiler to use. If `FC' is not already set in
1 the environment, then `dialect' is a hint to indicate what Fortran
1 dialect to search for; the default is to search for the newest
1 available dialect. Set the output variable `FC' to the name of
1 the compiler found.
1
1 By default, newer dialects are preferred over older dialects, but
1 if `dialect' is specified then older dialects are preferred
1 starting with the specified dialect. `dialect' can currently be
1 one of Fortran 77, Fortran 90, or Fortran 95. However, this is
1 only a hint of which compiler _name_ to prefer (e.g., `f90' or
1 `f95'), and no attempt is made to guarantee that a particular
1 language standard is actually supported. Thus, it is preferable
1 that you avoid the `dialect' option, and use AC_PROG_FC only for
1 code compatible with the latest Fortran standard.
1
1 This macro may, alternatively, be invoked with an optional first
1 argument which, if specified, must be a blank-separated list of
1 Fortran compilers to search for, just as in `AC_PROG_F77'.
1
1 If using `gfortran' or `g77' (the GNU Fortran compilers), then set
1 the shell variable `GFC' to `yes'. If the output variable
1 `FCFLAGS' was not already set in the environment, then set it to
1 `-g -02' for GNU `g77' (or `-O2' where `g77' does not accept
1 `-g'). Otherwise, set `FCFLAGS' to `-g' for all other Fortran
1 compilers.
1
1 The result of the GNU test is cached in the `ac_cv_fc_compiler_gnu'
1 variable, acceptance of `-g' in the `ac_cv_prog_fc_g' variable.
1
1 -- Macro: AC_PROG_F77_C_O
1 -- Macro: AC_PROG_FC_C_O
1 Test whether the Fortran compiler accepts the options `-c' and
1 `-o' simultaneously, and define `F77_NO_MINUS_C_MINUS_O' or
1 `FC_NO_MINUS_C_MINUS_O', respectively, if it does not.
1
1 The result of the test is cached in the `ac_cv_prog_f77_c_o' or
1 `ac_cv_prog_fc_c_o' variable, respectively.
1
1 The following macros check for Fortran compiler characteristics. To
1 check for characteristics not listed here, use `AC_COMPILE_IFELSE'
1 (⇒Running the Compiler) or `AC_RUN_IFELSE' (⇒Runtime),
1 making sure to first set the current language to Fortran 77 or Fortran
11 via `AC_LANG([Fortran 77])' or `AC_LANG(Fortran)' (⇒Language
Choice).
1
1 -- Macro: AC_F77_LIBRARY_LDFLAGS
1 -- Macro: AC_FC_LIBRARY_LDFLAGS
1 Determine the linker flags (e.g., `-L' and `-l') for the "Fortran
1 intrinsic and runtime libraries" that are required to successfully
1 link a Fortran program or shared library. The output variable
1 `FLIBS' or `FCLIBS' is set to these flags (which should be
1 included after `LIBS' when linking).
1
1 This macro is intended to be used in those situations when it is
1 necessary to mix, e.g., C++ and Fortran source code in a single
11 program or shared library (⇒Mixing Fortran 77 With C and C++
(automake)Mixing Fortran 77 With C and C++.).
1
1 For example, if object files from a C++ and Fortran compiler must
1 be linked together, then the C++ compiler/linker must be used for
1 linking (since special C++-ish things need to happen at link time
1 like calling global constructors, instantiating templates,
1 enabling exception support, etc.).
1
1 However, the Fortran intrinsic and runtime libraries must be
1 linked in as well, but the C++ compiler/linker doesn't know by
1 default how to add these Fortran 77 libraries. Hence, this macro
1 was created to determine these Fortran libraries.
1
1 The macros `AC_F77_DUMMY_MAIN' and `AC_FC_DUMMY_MAIN' or
1 `AC_F77_MAIN' and `AC_FC_MAIN' are probably also necessary to link
1 C/C++ with Fortran; see below. Further, it is highly recommended
1 that you use `AC_CONFIG_HEADERS' (⇒Configuration Headers)
1 because the complex defines that the function wrapper macros create
1 may not work with C/C++ compiler drivers.
1
1 These macros internally compute the flag needed to verbose linking
1 output and cache it in `ac_cv_prog_f77_v' or `ac_cv_prog_fc_v'
1 variables, respectively. The computed linker flags are cached in
1 `ac_cv_f77_libs' or `ac_cv_fc_libs', respectively.
1
1 -- Macro: AC_F77_DUMMY_MAIN ([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND =
1 `AC_MSG_FAILURE'])
1 -- Macro: AC_FC_DUMMY_MAIN ([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND =
1 `AC_MSG_FAILURE'])
1 With many compilers, the Fortran libraries detected by
1 `AC_F77_LIBRARY_LDFLAGS' or `AC_FC_LIBRARY_LDFLAGS' provide their
1 own `main' entry function that initializes things like Fortran
1 I/O, and which then calls a user-provided entry function named
1 (say) `MAIN__' to run the user's program. The `AC_F77_DUMMY_MAIN'
1 and `AC_FC_DUMMY_MAIN' or `AC_F77_MAIN' and `AC_FC_MAIN' macros
1 figure out how to deal with this interaction.
1
1 When using Fortran for purely numerical functions (no I/O, etc.)
1 often one prefers to provide one's own `main' and skip the Fortran
1 library initializations. In this case, however, one may still
1 need to provide a dummy `MAIN__' routine in order to prevent
1 linking errors on some systems. `AC_F77_DUMMY_MAIN' or
1 `AC_FC_DUMMY_MAIN' detects whether any such routine is _required_
1 for linking, and what its name is; the shell variable
1 `F77_DUMMY_MAIN' or `FC_DUMMY_MAIN' holds this name, `unknown'
1 when no solution was found, and `none' when no such dummy main is
1 needed.
1
1 By default, ACTION-IF-FOUND defines `F77_DUMMY_MAIN' or
1 `FC_DUMMY_MAIN' to the name of this routine (e.g., `MAIN__') _if_
1 it is required. ACTION-IF-NOT-FOUND defaults to exiting with an
1 error.
1
1 In order to link with Fortran routines, the user's C/C++ program
1 should then include the following code to define the dummy main if
1 it is needed:
1
1 #ifdef F77_DUMMY_MAIN
1 # ifdef __cplusplus
1 extern "C"
1 # endif
1 int F77_DUMMY_MAIN () { return 1; }
1 #endif
1
1 (Replace `F77' with `FC' for Fortran instead of Fortran 77.)
1
1 Note that this macro is called automatically from `AC_F77_WRAPPERS'
1 or `AC_FC_WRAPPERS'; there is generally no need to call it
1 explicitly unless one wants to change the default actions.
1
1 The result of this macro is cached in the `ac_cv_f77_dummy_main' or
1 `ac_cv_fc_dummy_main' variable, respectively.
1
1 -- Macro: AC_F77_MAIN
1 -- Macro: AC_FC_MAIN
1 As discussed above, many Fortran libraries allow you to provide an
1 entry point called (say) `MAIN__' instead of the usual `main',
1 which is then called by a `main' function in the Fortran libraries
1 that initializes things like Fortran I/O. The `AC_F77_MAIN' and
1 `AC_FC_MAIN' macros detect whether it is _possible_ to utilize
1 such an alternate main function, and defines `F77_MAIN' and
1 `FC_MAIN' to the name of the function. (If no alternate main
1 function name is found, `F77_MAIN' and `FC_MAIN' are simply
1 defined to `main'.)
1
1 Thus, when calling Fortran routines from C that perform things
1 like I/O, one should use this macro and declare the "main"
1 function like so:
1
1 #ifdef __cplusplus
1 extern "C"
1 #endif
1 int F77_MAIN (int argc, char *argv[]);
1
1 (Again, replace `F77' with `FC' for Fortran instead of Fortran 77.)
1
1 The result of this macro is cached in the `ac_cv_f77_main' or
1 `ac_cv_fc_main' variable, respectively.
1
1 -- Macro: AC_F77_WRAPPERS
1 -- Macro: AC_FC_WRAPPERS
1 Defines C macros `F77_FUNC (name, NAME)', `FC_FUNC (name, NAME)',
1 `F77_FUNC_(name, NAME)', and `FC_FUNC_(name, NAME)' to properly
1 mangle the names of C/C++ identifiers, and identifiers with
1 underscores, respectively, so that they match the name-mangling
1 scheme used by the Fortran compiler.
1
1 Fortran is case-insensitive, and in order to achieve this the
1 Fortran compiler converts all identifiers into a canonical case
1 and format. To call a Fortran subroutine from C or to write a C
1 function that is callable from Fortran, the C program must
1 explicitly use identifiers in the format expected by the Fortran
1 compiler. In order to do this, one simply wraps all C identifiers
1 in one of the macros provided by `AC_F77_WRAPPERS' or
1 `AC_FC_WRAPPERS'. For example, suppose you have the following
1 Fortran 77 subroutine:
1
1 subroutine foobar (x, y)
1 double precision x, y
1 y = 3.14159 * x
1 return
1 end
1
1 You would then declare its prototype in C or C++ as:
1
1 #define FOOBAR_F77 F77_FUNC (foobar, FOOBAR)
1 #ifdef __cplusplus
1 extern "C" /* prevent C++ name mangling */
1 #endif
1 void FOOBAR_F77 (double *x, double *y);
1
1 Note that we pass both the lowercase and uppercase versions of the
1 function name to `F77_FUNC' so that it can select the right one.
1 Note also that all parameters to Fortran 77 routines are passed as
11 pointers (⇒Mixing Fortran 77 With C and C++ (automake)Mixing
Fortran 77 With C and C++.).
1
1 (Replace `F77' with `FC' for Fortran instead of Fortran 77.)
1
1 Although Autoconf tries to be intelligent about detecting the
1 name-mangling scheme of the Fortran compiler, there may be Fortran
1 compilers that it doesn't support yet. In this case, the above
1 code generates a compile-time error, but some other behavior
1 (e.g., disabling Fortran-related features) can be induced by
1 checking whether `F77_FUNC' or `FC_FUNC' is defined.
1
1 Now, to call that routine from a C program, we would do something
1 like:
1
1 {
1 double x = 2.7183, y;
1 FOOBAR_F77 (&x, &y);
1 }
1
1 If the Fortran identifier contains an underscore (e.g., `foo_bar'),
1 you should use `F77_FUNC_' or `FC_FUNC_' instead of `F77_FUNC' or
1 `FC_FUNC' (with the same arguments). This is because some Fortran
1 compilers mangle names differently if they contain an underscore.
1
1 The name mangling scheme is encoded in the `ac_cv_f77_mangling' or
1 `ac_cv_fc_mangling' cache variable, respectively, and also used for
1 the `AC_F77_FUNC' and `AC_FC_FUNC' macros described below.
1
1 -- Macro: AC_F77_FUNC (NAME, [SHELLVAR])
1 -- Macro: AC_FC_FUNC (NAME, [SHELLVAR])
1 Given an identifier NAME, set the shell variable SHELLVAR to hold
1 the mangled version NAME according to the rules of the Fortran
1 linker (see also `AC_F77_WRAPPERS' or `AC_FC_WRAPPERS'). SHELLVAR
1 is optional; if it is not supplied, the shell variable is simply
1 NAME. The purpose of this macro is to give the caller a way to
1 access the name-mangling information other than through the C
1 preprocessor as above, for example, to call Fortran routines from
1 some language other than C/C++.
1
1 -- Macro: AC_FC_SRCEXT (EXT, [ACTION-IF-SUCCESS], [ACTION-IF-FAILURE =
1 `AC_MSG_FAILURE'])
1 -- Macro: AC_FC_PP_SRCEXT (EXT, [ACTION-IF-SUCCESS],
1 [ACTION-IF-FAILURE = `AC_MSG_FAILURE'])
1 By default, the `FC' macros perform their tests using a `.f'
1 extension for source-code files. Some compilers, however, only
1 enable newer language features for appropriately named files,
1 e.g., Fortran 90 features only for `.f90' files, or preprocessing
1 only with `.F' files or maybe other upper-case extensions. On the
1 other hand, some other compilers expect all source files to end in
1 `.f' and require special flags to support other file name
1 extensions. The `AC_FC_SRCEXT' and `AC_FC_PP_SRCEXT' macros deal
1 with these issues.
1
1 The `AC_FC_SRCEXT' macro tries to get the `FC' compiler to accept
1 files ending with the extension `.EXT' (i.e., EXT does _not_
1 contain the dot). If any special compiler flags are needed for
1 this, it stores them in the output variable `FCFLAGS_EXT'. This
1 extension and these flags are then used for all subsequent `FC'
1 tests (until `AC_FC_SRCEXT' or `AC_FC_PP_SRCEXT' is called another
1 time).
1
1 For example, you would use `AC_FC_SRCEXT(f90)' to employ the
1 `.f90' extension in future tests, and it would set the
1 `FCFLAGS_f90' output variable with any extra flags that are needed
1 to compile such files.
1
1 Similarly, the `AC_FC_PP_SRCEXT' macro tries to get the `FC'
1 compiler to preprocess and compile files with the extension
1 `.EXT'. When both `fpp' and `cpp' style preprocessing are
1 provided, the former is preferred, as the latter may treat
1 continuation lines, `//' tokens, and white space differently from
1 what some Fortran dialects expect. Conversely, if you do not want
1 files to be preprocessed, use only lower-case characters in the
1 file name extension. Like with `AC_FC_SRCEXT(f90)', any needed
1 flags are stored in the `FCFLAGS_EXT' variable.
1
1 The `FCFLAGS_EXT' flags can _not_ be simply absorbed into
1 `FCFLAGS', for two reasons based on the limitations of some
1 compilers. First, only one `FCFLAGS_EXT' can be used at a time,
1 so files with different extensions must be compiled separately.
1 Second, `FCFLAGS_EXT' must appear _immediately_ before the
1 source-code file name when compiling. So, continuing the example
1 above, you might compile a `foo.f90' file in your makefile with the
1 command:
1
1 foo.o: foo.f90
1 $(FC) -c $(FCFLAGS) $(FCFLAGS_f90) '$(srcdir)/foo.f90'
1
1 If `AC_FC_SRCEXT' or `AC_FC_PP_SRCEXT' succeeds in compiling files
1 with the EXT extension, it calls ACTION-IF-SUCCESS (defaults to
1 nothing). If it fails, and cannot find a way to make the `FC'
1 compiler accept such files, it calls ACTION-IF-FAILURE (defaults
1 to exiting with an error message).
1
1 The `AC_FC_SRCEXT' and `AC_FC_PP_SRCEXT' macros cache their
1 results in `ac_cv_fc_srcext_EXT' and `ac_cv_fc_pp_srcext_EXT'
1 variables, respectively.
1
1 -- Macro: AC_FC_PP_DEFINE ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE =
1 `AC_MSG_FAILURE'])
1 Find a flag to specify defines for preprocessed Fortran. Not all
1 Fortran compilers use `-D'. Substitute `FC_DEFINE' with the
1 result and call ACTION-IF-SUCCESS (defaults to nothing) if
1 successful, and ACTION-IF-FAILURE (defaults to failing with an
1 error message) if not.
1
1 This macro calls `AC_FC_PP_SRCEXT([F])' in order to learn how to
1 preprocess a `conftest.F' file, but restores a previously used
1 Fortran source file extension afterwards again.
1
1 The result of this test is cached in the `ac_cv_fc_pp_define'
1 variable.
1
1 -- Macro: AC_FC_FREEFORM ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE =
1 `AC_MSG_FAILURE'])
1 Try to ensure that the Fortran compiler (`$FC') allows free-format
1 source code (as opposed to the older fixed-format style from
1 Fortran 77). If necessary, it may add some additional flags to
1 `FCFLAGS'.
1
1 This macro is most important if you are using the default `.f'
1 extension, since many compilers interpret this extension as
1 indicating fixed-format source unless an additional flag is
1 supplied. If you specify a different extension with
1 `AC_FC_SRCEXT', such as `.f90', then `AC_FC_FREEFORM' ordinarily
1 succeeds without modifying `FCFLAGS'. For extensions which the
1 compiler does not know about, the flag set by the `AC_FC_SRCEXT'
1 macro might let the compiler assume Fortran 77 by default, however.
1
1 If `AC_FC_FREEFORM' succeeds in compiling free-form source, it
1 calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it
1 calls ACTION-IF-FAILURE (defaults to exiting with an error
1 message).
1
1 The result of this test, or `none' or `unknown', is cached in the
1 `ac_cv_fc_freeform' variable.
1
1 -- Macro: AC_FC_FIXEDFORM ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE =
1 `AC_MSG_FAILURE'])
1 Try to ensure that the Fortran compiler (`$FC') allows the old
1 fixed-format source code (as opposed to free-format style). If
1 necessary, it may add some additional flags to `FCFLAGS'.
1
1 This macro is needed for some compilers alias names like `xlf95'
1 which assume free-form source code by default, and in case you
1 want to use fixed-form source with an extension like `.f90' which
1 many compilers interpret as free-form by default. If you specify
1 a different extension with `AC_FC_SRCEXT', such as `.f', then
1 `AC_FC_FIXEDFORM' ordinarily succeeds without modifying `FCFLAGS'.
1
1 If `AC_FC_FIXEDFORM' succeeds in compiling fixed-form source, it
1 calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it
1 calls ACTION-IF-FAILURE (defaults to exiting with an error
1 message).
1
1 The result of this test, or `none' or `unknown', is cached in the
1 `ac_cv_fc_fixedform' variable.
1
1 -- Macro: AC_FC_LINE_LENGTH ([LENGTH], [ACTION-IF-SUCCESS],
1 [ACTION-IF-FAILURE = `AC_MSG_FAILURE'])
1 Try to ensure that the Fortran compiler (`$FC') accepts long source
1 code lines. The LENGTH argument may be given as 80, 132, or
1 unlimited, and defaults to 132. Note that line lengths above 254
1 columns are not portable, and some compilers do not accept more
1 than 132 columns at least for fixed format source. If necessary,
1 it may add some additional flags to `FCFLAGS'.
1
1 If `AC_FC_LINE_LENGTH' succeeds in compiling fixed-form source, it
1 calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it
1 calls ACTION-IF-FAILURE (defaults to exiting with an error
1 message).
1
1 The result of this test, or `none' or `unknown', is cached in the
1 `ac_cv_fc_line_length' variable.
1
1 -- Macro: AC_FC_CHECK_BOUNDS ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE
1 = `AC_MSG_FAILURE'])
1 The `AC_FC_CHECK_BOUNDS' macro tries to enable array bounds
1 checking in the Fortran compiler. If successful, the
1 ACTION-IF-SUCCESS is called and any needed flags are added to
1 `FCFLAGS'. Otherwise, ACTION-IF-FAILURE is called, which defaults
1 to failing with an error message. The macro currently requires
1 Fortran 90 or a newer dialect.
1
1 The result of the macro is cached in the `ac_cv_fc_check_bounds'
1 variable.
1
1 -- Macro: AC_F77_IMPLICIT_NONE ([ACTION-IF-SUCCESS],
1 [ACTION-IF-FAILURE = `AC_MSG_FAILURE'])
1 -- Macro: AC_FC_IMPLICIT_NONE ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE
1 = `AC_MSG_FAILURE'])
1 Try to disallow implicit declarations in the Fortran compiler. If
1 successful, ACTION-IF-SUCCESS is called and any needed flags are
1 added to `FFLAGS' or `FCFLAGS', respectively. Otherwise,
1 ACTION-IF-FAILURE is called, which defaults to failing with an
1 error message.
1
1 The result of these macros are cached in the
1 `ac_cv_f77_implicit_none' and `ac_cv_fc_implicit_none' variables,
1 respectively.
1
1 -- Macro: AC_FC_MODULE_EXTENSION
1 Find the Fortran 90 module file name extension. Most Fortran 90
1 compilers store module information in files separate from the
1 object files. The module files are usually named after the name
1 of the module rather than the source file name, with characters
1 possibly turned to upper case, plus an extension, often `.mod'.
1
1 Not all compilers use module files at all, or by default. The Cray
1 Fortran compiler requires `-e m' in order to store and search
1 module information in `.mod' files rather than in object files.
1 Likewise, the Fujitsu Fortran compilers uses the `-Am' option to
1 indicate how module information is stored.
1
1 The `AC_FC_MODULE_EXTENSION' macro computes the module extension
1 without the leading dot, and stores that in the `FC_MODEXT'
1 variable. If the compiler does not produce module files, or the
1 extension cannot be determined, `FC_MODEXT' is empty. Typically,
1 the result of this macro may be used in cleanup `make' rules as
1 follows:
1
1 clean-modules:
1 -test -z "$(FC_MODEXT)" || rm -f *.$(FC_MODEXT)
1
1 The extension, or `unknown', is cached in the
1 `ac_cv_fc_module_ext' variable.
1
1 -- Macro: AC_FC_MODULE_FLAG ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE =
1 `AC_MSG_FAILURE'])
1 Find the compiler flag to include Fortran 90 module information
1 from another directory, and store that in the `FC_MODINC' variable.
1 Call ACTION-IF-SUCCESS (defaults to nothing) if successful, and
1 set `FC_MODINC' to empty and call ACTION-IF-FAILURE (defaults to
1 exiting with an error message) if not.
1
1 Most Fortran 90 compilers provide a way to specify module
1 directories. Some have separate flags for the directory to write
1 module files to, and directories to search them in, whereas others
1 only allow writing to the current directory or to the first
1 directory specified in the include path. Further, with some
1 compilers, the module search path and the preprocessor search path
1 can only be modified with the same flag. Thus, for portability,
1 write module files to the current directory only and list that as
1 first directory in the search path.
1
1 There may be no whitespace between `FC_MODINC' and the following
1 directory name, but `FC_MODINC' may contain trailing white space.
1 For example, if you use Automake and would like to search `../lib'
1 for module files, you can use the following:
1
1 AM_FCFLAGS = $(FC_MODINC). $(FC_MODINC)../lib
1
1 Inside `configure' tests, you can use:
1
1 if test -n "$FC_MODINC"; then
1 FCFLAGS="$FCFLAGS $FC_MODINC. $FC_MODINC../lib"
1 fi
1
1 The flag is cached in the `ac_cv_fc_module_flag' variable. The
1 substituted value of `FC_MODINC' may refer to the `ac_empty' dummy
1 placeholder empty variable, to avoid losing the significant
1 trailing whitespace in a `Makefile'.
1
1 -- Macro: AC_FC_MODULE_OUTPUT_FLAG ([ACTION-IF-SUCCESS],
1 [ACTION-IF-FAILURE = `AC_MSG_FAILURE'])
1 Find the compiler flag to write Fortran 90 module information to
1 another directory, and store that in the `FC_MODOUT' variable.
1 Call ACTION-IF-SUCCESS (defaults to nothing) if successful, and
1 set `FC_MODOUT' to empty and call ACTION-IF-FAILURE (defaults to
1 exiting with an error message) if not.
1
1 Not all Fortran 90 compilers write module files, and of those that
1 do, not all allow writing to a directory other than the current
1 one, nor do all have separate flags for writing and reading; see
1 the description of `AC_FC_MODULE_FLAG' above. If you need to be
1 able to write to another directory, for maximum portability use
1 `FC_MODOUT' before any `FC_MODINC' and include both the current
1 directory and the one you write to in the search path:
1
1 AM_FCFLAGS = $(FC_MODOUT)../mod $(FC_MODINC)../mod $(FC_MODINC). ...
1
1 The flag is cached in the `ac_cv_fc_module_output_flag' variable.
1 The substituted value of `FC_MODOUT' may refer to the `ac_empty'
1 dummy placeholder empty variable, to avoid losing the significant
1 trailing whitespace in a `Makefile'.
1