2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: directory, options, options, directory search, search path, INCLUDE directive, directive, INCLUDE
10 Options for directory search
11 ****************************
13 These options affect how GNU Fortran searches
14 for files specified by the ``INCLUDE`` directive and where it searches
15 for previously compiled modules.
17 It also affects the search paths used by :command:`cpp` when used to preprocess
20 .. index:: Idir, directory, search paths for inclusion, inclusion, directory search paths for, search paths, for included files, paths, search, module search path
24 These affect interpretation of the ``INCLUDE`` directive
25 (as well as of the ``#include`` directive of the :command:`cpp`
28 Also note that the general behavior of :option:`-I` and
29 ``INCLUDE`` is pretty much the same as of :option:`-I` with
30 ``#include`` in the :command:`cpp` preprocessor, with regard to
31 looking for :samp:`header.gcc` files and other such things.
33 This path is also used to search for :samp:`.mod` files when previously
34 compiled modules are required by a ``USE`` statement.
36 See :ref:`gcc:directory-options`, for information on the
39 .. index:: Jdir, Mdir, paths, search, module search path
43 This option specifies where to put :samp:`.mod` files for compiled modules.
44 It is also added to the list of directories to searched by an ``USE``
47 The default is the current directory.
49 .. index:: fintrinsic-modules-pathdir, paths, search, module search path
51 .. option:: -fintrinsic-modules-path {dir}
53 This option specifies the location of pre-compiled intrinsic modules, if
54 they are not in the default location expected by the compiler.