157 warnings: remove -DXK_MISCELLANY from Makefiles
[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. 1997):
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 XCOMM If you have the tirpc library on your system, and you have the
121 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
122 XCOMM your host.def or site.def file.  Using the tirpc lib should
123 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
124 XCOMM The default is NO.
125
126 #ifndef HasTIRPCLib
127 # define HasTIRPCLib NO
128 #endif
129
130 #if HasTIRPCLib
131 TIRPCLIB = -ltirpc
132 #else
133 TIRPCLIB = 
134 #endif
135
136 #if LinuxCLibMajorVersion < 6
137 # define LinuxSourceDefines     -D_POSIX_SOURCE \
138                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
139 # ifndef HasLibCrypt
140 #  define HasLibCrypt           NO
141 # endif
142
143 #else
144 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
145                                 -D_POSIX_SOURCE \
146                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
147                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
148                                 LinuxLocaleDefines
149 # define HasPosixThreads        YES
150 # define ThreadedX              YES
151 # define HasThreadSafeAPI       YES
152 # define ThreadsLibraries       -lpthread
153 # define SystemMTDefines                -D_REENTRANT
154 # ifndef HasLibCrypt
155 #  define HasLibCrypt           YES
156 # endif
157 #endif
158
159 #ifdef SparcArchitecture
160 #define LinuxMachineDefines -Dsparc
161
162 #if UseElfFormat
163 #define HasPlugin               YES
164 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
165 #endif
166 #endif /* SparcArchitecture */
167
168 #ifdef ARMArchitecture
169 #define LinuxMachineDefines -D__arm__
170 #define LSBBitOrder             YES
171
172 #if UseElfFormat
173 #define HasPlugin               YES
174 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
175 #endif 
176 #endif /* ARMArchitecture */
177
178 #ifdef i386Architecture
179 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
180 #define LinuxMachineDefines     -D__i386__
181 /* For DtHelp TIFF processing routines. */
182 #define LSBBitOrder             YES
183
184 #if UseElfFormat
185 #define HasPlugin               YES
186 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
187 #endif
188 /* add this to void screenfuls of warnings from makedepend */
189 #define DependFlags -I/usr/include/i386-linux-gnu
190 #endif /* i386Architecture */
191
192 #ifdef AMD64Architecture
193 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
194 #define LinuxMachineDefines     -D__x86_64__ 
195 /* For DtHelp TIFF processing routines. */
196 #define LSBBitOrder             YES
197
198 #if UseElfFormat
199 #define HasPlugin               YES
200 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
201 #endif
202 /* add this to void screenfuls of warnings from makedepend */
203 #define DependFlags -I/usr/include/x86_64-linux-gnu
204 #endif /* AMD64Architecture */
205
206 #ifdef PpcArchitecture
207 #define OptimizedCDebugFlags    -O2
208 #define LinuxMachineDefines     -D__powerpc__
209 #endif /* PpcArchitecture */
210
211 #ifdef AlphaArchitecture
212 #define OptimizedCDebugFlags    -O2
213 #define LinuxMachineDefines     -D__alpha__
214 #endif /* AlphaArchitecture */
215
216 #ifdef Mc68020Architecture
217 #define OptimizedCDebugFlags    -O2
218 #define LinuxMachineDefines     -D__mc68000__
219 #define StandardCppDefines      -traditional 
220 #endif /* Mc68020Architecture */
221
222 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
223
224 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
225
226 XCOMM This is needed for CDE currently
227 #define CplusplusStandardDefines StandardDefines 
228
229 /* Some of these man page defaults are overriden in the above OS sections */
230 #ifndef ManSuffix
231 # define ManSuffix      1x
232 #endif
233 #ifndef ManDir
234 # define ManDir         $(MANSOURCEPATH)1
235 #endif
236 #ifndef LibManSuffix
237 # define LibManSuffix   3x
238 #endif
239 #ifndef LibmanDir
240 # define LibmanDir      $(MANSOURCEPATH)3
241 #endif
242 #ifndef FileManSuffix
243 # define FileManSuffix  5x
244 #endif
245 #ifndef FileManDir
246 # define FileManDir     $(MANSOURCEPATH)5
247 #endif
248
249 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
250
251 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
252 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
253
254 #include <lnxLib.rules>
255 #include <xfree86.cf>