build: linux.cf, remove the space in the -isystem include of the X11 headers
[oweals/cde.git] / cde / config / cf / linux.cf
1 XCOMM platform:  $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
2
3 /* To reduce the number of warnings generated by X11 and Motif headers that
4    dislike -ansi and -pedantic we can include them with -isystem instead of
5    -I, this tells GCC to treat them as system includes out of our control */
6 #define TopXInclude -isystem$(TOP)/imports/x11/include
7
8 #ifndef OSName
9 #define OSName                  DefaultOSName
10 #endif
11 #ifndef OSMajorVersion
12 #define OSMajorVersion          DefaultOSMajorVersion
13 #endif
14 #ifndef OSMinorVersion
15 #define OSMinorVersion          DefaultOSMinorVersion
16 #endif
17 #ifndef OSTeenyVersion
18 #define OSTeenyVersion          DefaultOSTeenyVersion
19 #endif
20
21 #ifndef LinuxDistribution 
22 #define LinuxDistribution       DefaultLinuxDistribution
23 /*
24   Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
25   Currently only LinuxSuSE will be figured out automatically.
26   Valid values are (from the list at www.linux.org in Oct. '97):
27     LinuxUnknown    (0)
28     LinuxSuSE       (1)
29     LinuxCaldera    (2)
30     LinuxCraftworks (3)
31     LinuxDebian     (4)
32     LinuxInfoMagic  (5)
33     LinuxKheops     (6)
34     LinuxPro        (7)
35     LinuxRedHat     (8)
36     LinuxSlackware  (9)
37     LinuxTurbo      (10)
38     LinuxWare       (11)
39     LinuxYggdrasil  (12)
40 */
41 #endif
42 #ifndef LinuxCLibMajorVersion
43 #define LinuxCLibMajorVersion   DefaultLinuxCLibMajorVersion
44 #endif
45 #ifndef LinuxCLibMinorVersion
46 #define LinuxCLibMinorVersion   DefaultLinuxCLibMinorVersion
47 #endif
48 #ifndef LinuxCLibTeenyVersion
49 #define LinuxCLibTeenyVersion   DefaultLinuxCLibTeenyVersion
50 #endif
51 #ifndef LinuxBinUtilsMajorVersion
52 #define LinuxBinUtilsMajorVersion       DefaultLinuxBinUtilsMajorVersion
53 #endif
54
55 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
56 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
57 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
58
59 #ifndef UseElfFormat
60 #if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
61 #define UseElfFormat            YES
62 #else
63 #define UseElfFormat            NO
64 #error "Only ELF format is supported on linux"
65 #endif
66 #endif
67 #define BuildLibPathVar         LD_LIBRARY_PATH
68 #define HasGcc                  YES
69 #define HasGcc2                 YES
70 #define HasGcc2ForCplusplus     YES
71 #define GccUsesGas              YES
72 #define UseGas                  YES
73 #define GnuCpp                  YES
74 #define HasShadowPasswd         YES
75 #define HasPutenv               YES
76 #define HasShm                  YES
77 #define HasSockets              YES
78 #if (LinuxDistribution == LinuxRedHat)
79 #define HasZlib                 YES
80 #endif
81
82 #define AvoidNullMakeCommand    YES
83 #define StripInstalledPrograms  YES
84 #define CompressAllFonts        YES
85 #define Malloc0ReturnsNull      YES
86 #define NeedConstPrototypes     YES
87 #define NeedFunctionPrototypes  YES
88 #define NeedNestedPrototypes    YES
89 #define NeedVarargsPrototypes   YES
90 #define NeedWidePrototypes      NO
91 #define SetTtyGroup             YES
92
93 #define CcCmd                   gcc -g -pipe
94 #define CplusplusCmd            g++ -g -pipe -fpermissive 
95 #define AsCmd                   as
96 #define LdCmd                   ld
97
98 #define CplusplusLibC           -lstdc++
99 #define AsmDefines              -D__ELF__
100
101 #define MkdirHierCmd            mkdir -p
102 #define CppCmd                  /lib/cpp
103 #if OSMajorVersion >= 2
104 #define YaccCmd                 yacc
105 #else
106 #define YaccCmd                 bison -y
107 #endif
108 #define LexCmd                  flex -l
109 #define LexLib                  -lfl
110 #define PreProcessCmd           CcCmd -E
111 #define PostIncDir              DefaultGccIncludeDir
112 #define LdCombineFlags          -r
113 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
114 #define HasWChar32              YES
115 #define StandardCppDefines      -traditional StandardDefines
116 #define ExtensionOSDefines      -DXTESTEXT1
117
118 #define LinuxLocaleDefines      /**/
119
120 #if LinuxCLibMajorVersion < 6
121 # define LinuxSourceDefines     -D_POSIX_SOURCE \
122                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
123 # ifndef HasLibCrypt
124 #  define HasLibCrypt           NO
125 # endif
126
127 #else
128 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
129                                 -D_POSIX_SOURCE \
130                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
131                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
132                                 LinuxLocaleDefines
133 # define HasPosixThreads        YES
134 # define ThreadedX              YES
135 # define HasThreadSafeAPI       YES
136 # define ThreadsLibraries       -lpthread
137 # define SystemMTDefines                -D_REENTRANT
138 # ifndef HasLibCrypt
139 #  define HasLibCrypt           YES
140 # endif
141 #endif
142
143 #ifdef SparcArchitecture
144 #define LinuxMachineDefines -Dsparc
145
146 #if UseElfFormat
147 #define HasPlugin               YES
148 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
149 #endif
150 #endif /* SparcArchitecture */
151
152 #ifdef ARMArchitecture
153 #define LinuxMachineDefines -D__arm__
154 #define LSBBitOrder             YES
155
156 #if UseElfFormat
157 #define HasPlugin               YES
158 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
159 #endif 
160 #endif /* ARMArchitecture */
161
162 #ifdef i386Architecture
163 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
164 #define LinuxMachineDefines     -D__i386__
165 /* For DtHelp TIFF processing routines. */
166 #define LSBBitOrder             YES
167
168 #if UseElfFormat
169 #define HasPlugin               YES
170 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
171 #endif
172 #endif /* i386Architecture */
173
174 #ifdef AMD64Architecture
175 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
176 #define LinuxMachineDefines     -D__x86_64__ 
177 /* For DtHelp TIFF processing routines. */
178 #define LSBBitOrder             YES
179
180 #if UseElfFormat
181 #define HasPlugin               YES
182 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
183 #endif
184 #endif /* AMD64Architecture */
185
186 #ifdef PpcArchitecture
187 #define OptimizedCDebugFlags    -O2
188 #define LinuxMachineDefines     -D__powerpc__
189 #endif /* PpcArchitecture */
190
191 #ifdef AlphaArchitecture
192 #define OptimizedCDebugFlags    -O2
193 #define LinuxMachineDefines     -D__alpha__
194 #endif /* AlphaArchitecture */
195
196 #ifdef Mc68020Architecture
197 #define OptimizedCDebugFlags    -O2
198 #define LinuxMachineDefines     -D__mc68000__
199 #define StandardCppDefines      -traditional 
200 #endif /* Mc68020Architecture */
201
202 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
203
204 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
205
206 XCOMM This is needed for CDE currently
207 #define CplusplusStandardDefines StandardDefines 
208
209 /* Some of these man page defaults are overriden in the above OS sections */
210 #ifndef ManSuffix
211 # define ManSuffix      1x
212 #endif
213 #ifndef ManDir
214 # define ManDir         $(MANSOURCEPATH)1
215 #endif
216 #ifndef LibManSuffix
217 # define LibManSuffix   3x
218 #endif
219 #ifndef LibmanDir
220 # define LibmanDir      $(MANSOURCEPATH)3
221 #endif
222 #ifndef FileManSuffix
223 # define FileManSuffix  5x
224 #endif
225 #ifndef FileManDir
226 # define FileManDir     $(MANSOURCEPATH)5
227 #endif
228
229 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
230
231 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
232 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
233
234 #include <lnxLib.rules>
235 #include <xfree86.cf>