1
.TH fpc.cfg 5 "22 february 2002" FPC "FPC configuration file"
3
fpc.cfg \- Free Pascal Compiler (FPC) configuration file, name derived from Free Pascal Compiler.
6
This is the main configuration file of the
7
.I Free Pascal Compiler (FPC)
9
All commandline options of the compiler (described in
11
) can be specified in fpc.cfg
13
When the configuration file is found, it is read, and the lines
14
it contains are treated like you typed them on the command line see
16
with some extra condtional possibilities.
20
You can specify comments in the configuration file with the # sign.
21
Everything from the # on will be ignored, unless it is one of the keywords (see below).
23
The compiler looks for the fpc.cfg file in the following places :
25
\ \fI\- Under Linux and unix\fP
27
\ \ \- The current directory.
29
\ \ \- Home directory, looks for .fpc.cfg
31
\ \ \- The directory specified in the environment
33
\ \ variable PPC\_CONFIG\_PATH, and if it's not
37
\ \fI- Under all other OSes:\fP
39
\ \ \- The current directory.
41
\ \ \- The directory specified in the environment
43
\ \ variable PPC\_CONFIG\_PATH.
45
\ \ \- The directory where the compiler binary is.
49
When the compiler has finished reading the configuration file, it continues
50
to treat the command line options.
52
One of the command\-line options allows you to specify a second configuration
53
file: Specifying \@foo on the command line will use file foo instead of fpc.cfg
54
and read further options from there. When the compiler has finished reading
55
this file, it continues to process the command line.
57
The configuration file allows some kind of preprocessing. It understands the
58
following directives, which you should place on the first column of a line :
79
They work the same way as their $... directive counterparts in Pascal:
86
Lines following #IFDEF are skipped read if the keyword "name"
87
following it is not defined.
89
They are read until the keywords #ELSE or #ENDIF are
90
encountered, after which normal processing is resumed.
95
\-Fu/usr/lib/fpc/0.99.12/rtl
100
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to
101
the path if you're compiling with version 0.99.12 of the compiler.
109
Lines following #IFDEF are skipped read if the keyword "name"
110
following it is defined.
112
They are read until the keywords #ELSE or #ENDIF are
113
encountered, after which normal processing is resumed.
118
-Fu/usr/lib/fpc/0.99.13/rtl
122
In the above example, /usr/lib/fpc/0.99.13/rtl will be added to
123
the path if you're NOT compiling with version 0.99.12 of the compiler.
130
#ELSE can be specified after a #IFDEF or #IFNDEF
131
directive as an alternative.
132
Lines following #ELSE are skipped read if the preceding #IFDEF
133
#IFNDEF was accepted.
135
They are skipped until the keyword #ENDIF is
136
encountered, after which normal processing is resumed.
142
-Fu/usr/lib/fpc/0.99.12/rtl
146
-Fu/usr/lib/fpc/0.99.13/rtl
151
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to
152
the path if you're compiling with version 0.99.12 of the compiler,
153
otherwise /usr/lib/fpc/0.99.13/rtl will be added to the path.
160
#ENDIF marks the end of a block that started with #IF(N)DEF,
161
possibly with an #ELSE between it.
169
#DEFINE defines a new keyword. This has the same effect as a
170
"\-dname" command\-line option.
178
#UNDEF un-defines a keyword if it existed.
179
This has the same effect as a "-uname" command-line option.
187
#WRITE writes "Message Text" to the screen.
188
This can be useful to display warnings if certain options are set.
193
#WRITE Setting debugging ON...
201
if "DEBUG is defined, this will produce a line
203
Setting debugging ON...
205
and will then switch on debugging information in the compiler.
213
#INCLUDE instructs the compiler to read the contents of
214
"filename" before continuing to process options in the current file.
216
This can be useful if you want to have a particular configuration file
217
for a project (or, under Unix like systems (such as Linux), in
218
your home directory), but still want to have the global options that are
219
set in a global configuration file.
224
#INCLUDE /etc/fpc.cfg
230
#INCLUDE c:\\pp\\bin\\fpc.cfg
237
This will include /etc/fpc.cfg if you're on a unix like machine (like linux),
238
and will include c:\\pp\\bin\\fpc.cfg on a dos machine.
245
The #SECTION directive acts as a #IFDEF directive, only
246
it doesn't require an #ENDIF directive. the special name COMMON
247
always exists, i.e. lines following #SECTION COMMON are always read.
252
A standard block often used in (the Linux version of) fpc.cfg is
258
#IFDEF FPC_LINK_STATIC
260
\-Fu/usr/lib/fpc/0.99.12/rtl/static
262
\-Fu/usr/lib/fpc/0.99.12/units/static
266
#IFDEF FPC_LINK_DYNAMIC
268
\-Fu/usr/lib/fpc/0.99.12/rtl/shared
270
\-Fu/usr/lib/fpc/0.99.12/units/shared
274
\-Fu/usr/lib/fpc/0.99.12/rtl
276
\-Fu/usr/lib/fpc/0.99.12/units
280
The block is copied into the fpc.cfg file for each version you use (normally
281
the latest release and the lastest developpers