1{
2    This file is part of the Free Pascal Integrated Development Environment
3    Copyright (c) 1999 by Berczi Gabor
4
5    Conditional defines logic for the IDE
6
7    This program is distributed in the hope that it will be useful,
8    but WITHOUT ANY WARRANTY; without even the implied warranty of
9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
11 **********************************************************************}
12
13{$ifdef USE_GDBLIBINC}
14  {$include gdblib.inc}
15{$endif USE_GDBLIBINC}
16
17{ --- Special OS settings --- }
18{$ifdef Go32V2}
19  { NOVESA conditional avoids use of
20    vesa unit, it also disables USE_GRAPH_SWITCH
21    conditional, in order to obtain a go32v2 excutable that
22    doesn't require full screen switching
23    at startup on Windows OS }
24  {$ifndef NOVESA}
25    {$define SUPPORTVESA}
26  {$endif ndef NOVESA}
27  {$define SUPPORTREDIR}
28  {$define WinClipSupported}
29  {$define HasSignal}
30  {$define SignalIsFunction}
31  {$define SignalIsCdecl}
32  {$define FSCaseInsensitive}
33  {$define HasSysMsgUnit}
34  {$ifndef NOVESA}
35    {$define USE_GRAPH_SWITCH}
36  {$endif not NOVESA}
37{$endif}
38
39{$ifdef Linux}
40  {$undef SUPPORTVESA}
41  {$define SUPPORTREDIR}
42  {$undef WinClipSupported}
43  {$define HasSignal}
44  {$define SignalIsCdecl}
45  {$define HasSysMsgUnit}
46{$endif}
47
48
49{$ifdef FreeBSD}
50  {$undef SUPPORTVESA}
51  {$define SUPPORTREDIR}
52  {$undef WinClipSupported}
53  {$define HasSignal}
54  {$define SignalIsCdecl}
55  {$define HasSysMsgUnit}
56{$endif}
57
58{$ifdef NetBSD}
59  {$undef SUPPORTVESA}
60  {$define SUPPORTREDIR}
61  {$undef WinClipSupported}
62  {$define HasSignal}
63  {$define SignalIsCdecl}
64  {$define HasSysMsgUnit}
65{$endif}
66
67{$ifdef OpenBSD}
68  {$undef SUPPORTVESA}
69  {$define SUPPORTREDIR}
70  {$undef WinClipSupported}
71  {$define HasSignal}
72  {$define SignalIsCdecl}
73  {$define HasSysMsgUnit}
74{$endif}
75
76{$ifdef Windows}
77  {$undef SUPPORTVESA}
78  {$define SUPPORTREDIR}
79  {$define WinClipSupported}
80  {$ifdef win32}
81    {$define HasSignal}
82    {$define SignalIsFunction}
83    {$define SignalIsCdecl}
84  {$endif}
85  {$ifdef win64}
86    {$define HasSignal}
87    {$define SignalIsFunction}
88    {$define SignalIsCdecl}
89  {$endif}
90  {$define FSCaseInsensitive}
91  {$define HasSysMsgUnit}
92{$endif}
93
94{$ifdef OS2}
95  {define SUPPORTREDIR}
96  {define WinClipSupported}
97  {define HasSignal}
98  {$define FSCaseInsensitive}
99{$endif}
100
101{$ifdef Amiga}
102  {$define FSCaseInsensitive}
103  {$define WinClipSupported}
104{$endif}
105
106{$ifdef MorphOS}
107  {$define FSCaseInsensitive}
108  {$define WinClipSupported}
109{$endif}
110
111{$ifdef AROS}
112  {$define FSCaseInsensitive}
113  {$define WinClipSupported}
114{$endif}
115
116{ --- Exclude debugger support --- }
117{.$DEFINE NODEBUG}
118
119{ --- Include VESA support --- }
120{$ifdef SUPPORTVESA}
121  {$ifndef FV20}
122    {$define VESA}
123  {$endif}
124{$endif}
125
126{$ifdef SUPPORTREDIR}
127  {$ifndef debug}
128    {$define redircompiler}
129  {$endif}
130  {$ifdef GDB_V418}
131    {define redircompiler}
132  {$endif GDB_V418}
133{$endif}
134
135{ ----------- define DOS for DOS targets ---------- }
136{$ifdef GO32V2}{$define DOS}{$endif}
137
138{ include Undo/Redo code from Visa Harvey }
139{ let everybody try it out  PM }
140{ undo should be a bit improved - it does work only with "normal" keystrokes.
141  neither the block, nor any shortcut operations (like Ctrl-T - delete word)
142  do work... Gabor
143  Partially solved at least PM }
144{$define Undo}
145{$ifdef DEBUG}
146  {$define DebugUndo}
147  {$define TEST_REGEXP}
148  { Use old regexpr unit by Joost }
149  {$define USE_OLD_REGEXP}
150  { Use this to incorporate a call to
151    external compiler.
152    Parsing of compiler output is done,
153    but there is no browser in that case!! PM }
154  { $ define USE_EXTERNAL_COMPILER}
155  {$define EXEDEBUG}
156{$endif DEBUG}
157
158{$ifndef ver2_0}
159  {$define USERESSTRINGS}
160{$endif}
161{$define USE_FREEVISION}
162{$define HASOUTLINE}
163
164{ Use inlining for small functions }
165  {$inline on}
166  {.$define USEINLINE}
167
168{$define TEST_PARTIAL_SYNTAX}
169{ $ undef UNDO}
170{ $ undef DEBUGUNDO}
171
172{$define BROWSERCOL}
173
174{$ifdef SUPPORTVESA}
175  {$define VESA}
176{$endif}
177
178{$ifdef NOWINCLIP}
179  {$undef WINCLIPSUPPORTED}
180{$endif}
181
182{$ifdef CROSSGDB}
183  {$define SUPPORT_REMOTE}
184{$endif CROSSGDB}
185
186{$ifdef FPC_ARMEL}
187  {$define FPC_ARMEL32}
188{$endif FPC_ARMEL}
189{$ifdef FPC_ARMEB}
190  {$define FPC_ARMEB32}
191{$endif FPC_ARMEB}
192{$ifdef FPC_OARM}
193  {$define FPC_ARMEL32}
194{$endif FPC_OARM}
195{$ifdef FPC_ARMHF}
196  {$define FPC_ARMEL32}
197{$endif FPC_ARMHF}
198
199{ Set TARGET_IS_64BIT for corresponding compilation targets }
200{$ifdef X86_64}
201  {$define TARGET_IS_64BIT}
202{$endif}
203{$ifdef IA64}
204  {$define TARGET_IS_64BIT}
205{$endif}
206{$ifdef ALPHA}
207  {$define TARGET_IS_64BIT}
208{$endif}
209{$ifdef POWERPC64}
210  {$define TARGET_IS_64BIT}
211{$endif}
212{$ifdef AARCH64}
213  {$define TARGET_IS_64BIT}
214{$endif}
215
216{$ifdef GDBMI}
217  {$ifdef DEBUG}
218    {$define GDB_RAW_OUTPUT}
219  {$endif DEBUG}
220  {$ifdef Windows}
221    {$define GDB_WINDOWS_ALWAYS_USE_ANOTHER_CONSOLE}
222  {$endif Windows}
223{$endif GDBMI}
224