OpenBSD.cf: don't include xorg.cf (leftover)
[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
68 #define BuildLibPathVar         LD_LIBRARY_PATH
69 #define HasGcc                  YES
70 #define HasGcc2                 YES
71 #define HasGcc2ForCplusplus     YES
72 #define GccUsesGas              YES
73 #define UseGas                  YES
74 #define GnuCpp                  YES
75 #define HasShadowPasswd         YES
76 #define HasPutenv               YES
77 #define HasShm                  YES
78 #define HasSockets              YES
79 #if (LinuxDistribution == LinuxRedHat)
80 # define HasZlib                YES
81 #endif
82
83 #define AvoidNullMakeCommand    YES
84 #define StripInstalledPrograms  YES
85 #define CompressAllFonts        YES
86 #define Malloc0ReturnsNull      YES
87 #define NeedConstPrototypes     YES
88 #define NeedFunctionPrototypes  YES
89 #define NeedNestedPrototypes    YES
90 #define NeedVarargsPrototypes   YES
91 #define NeedWidePrototypes      NO
92 #define SetTtyGroup             YES
93
94 #define CcCmd                   gcc -g -pipe
95 #define CplusplusCmd            g++ -g -pipe -fpermissive
96 #define AsCmd                   as
97 #define LdCmd                   ld
98
99 #define CplusplusLibC           -lstdc++
100 #define AsmDefines              -D__ELF__
101
102 #define MkdirHierCmd            mkdir -p
103 #define CppCmd                  /lib/cpp
104 #if OSMajorVersion >= 2
105 # define YaccCmd                yacc
106 #else
107 # define YaccCmd                bison -y
108 #endif
109 #define LexCmd                  flex -l
110 #define LexLib                  -lfl
111 #define PreProcessCmd           CcCmd -E
112 #define PostIncDir              DefaultGccIncludeDir
113 #define LdCombineFlags          -r
114 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
115 #define HasWChar32              YES
116 #define StandardCppDefines      -traditional StandardDefines
117 #define ExtensionOSDefines      -DXTESTEXT1
118
119 #define LinuxLocaleDefines      /**/
120
121 XCOMM If you have the tirpc library on your system, and you have the
122 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
123 XCOMM your host.def or site.def file.  Using the tirpc lib should
124 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
125 XCOMM The default is NO.
126
127 #ifndef HasTIRPCLib
128 # define HasTIRPCLib NO
129 #endif
130
131 #if HasTIRPCLib
132 TIRPCLIB = -ltirpc
133 #else
134 TIRPCLIB = 
135 #endif
136
137 #if !defined(DefaultGcc2i386Opt)
138 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
139 #endif
140
141 #if LinuxCLibMajorVersion < 6
142 # define LinuxSourceDefines     -D_POSIX_SOURCE \
143                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
144 # ifndef HasLibCrypt
145 #  define HasLibCrypt           NO
146 # endif
147
148 #else
149 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
150                                 -D_POSIX_SOURCE \
151                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
152                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
153                                 LinuxLocaleDefines
154 # define HasPosixThreads        YES
155 # define ThreadedX              YES
156 # define HasThreadSafeAPI       YES
157 # define ThreadsLibraries       -lpthread
158 # define SystemMTDefines                -D_REENTRANT
159 # ifndef HasLibCrypt
160 #  define HasLibCrypt           YES
161 # endif
162 #endif
163
164 #ifdef SparcArchitecture
165 # define LinuxMachineDefines -Dsparc
166
167 # if UseElfFormat
168 #  define HasPlugin             YES
169 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
170 # endif
171 #endif /* SparcArchitecture */
172
173 #ifdef ARMArchitecture
174 # define LinuxMachineDefines -D__arm__
175 # define LSBBitOrder             YES
176
177 # if UseElfFormat
178 #  define HasPlugin              YES
179 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
180 # endif 
181 #endif /* ARMArchitecture */
182
183 #ifdef i386Architecture
184 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
185 # define LinuxMachineDefines    -D__i386__
186 /* For DtHelp TIFF processing routines. */
187 # define LSBBitOrder             YES
188
189 # if UseElfFormat
190 #  define HasPlugin             YES
191 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
192 # endif
193 /* add this to void screenfuls of warnings from makedepend */
194 # define DependFlags -I/usr/include/i386-linux-gnu
195 #endif /* i386Architecture */
196
197 #ifdef AMD64Architecture
198 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
199 # define LinuxMachineDefines    -D__x86_64__ 
200 /* For DtHelp TIFF processing routines. */
201 # define LSBBitOrder            YES
202
203 # if UseElfFormat
204 #  define HasPlugin             YES
205 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
206 # endif
207 /* add this to void screenfuls of warnings from makedepend */
208 # define DependFlags -I/usr/include/x86_64-linux-gnu
209 #endif /* AMD64Architecture */
210
211 #ifdef PpcArchitecture
212 # define OptimizedCDebugFlags    DefaultGcc2i386Opt
213 # define LinuxMachineDefines     -D__powerpc__
214 #endif /* PpcArchitecture */
215
216 #ifdef AlphaArchitecture
217 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
218 # define LinuxMachineDefines    -D__alpha__
219 #endif /* AlphaArchitecture */
220
221 #ifdef Mc68020Architecture
222 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
223 # define LinuxMachineDefines    -D__mc68000__
224 # define StandardCppDefines      -traditional 
225 #endif /* Mc68020Architecture */
226
227 #ifdef HasGcc2
228 CXXDEPENDINCLUDE = $(shell CppCmd -x c++ -Wp,-v < /dev/null \
229                    2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p')
230 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
231 #endif
232 #define DependDefines           -D_SYS_RESOURCE_H -D_SYS_UTSNAME_H
233
234 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
235
236 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
237
238 XCOMM This is needed for CDE currently
239 #define CplusplusStandardDefines StandardDefines 
240
241 /* Some of these man page defaults are overriden in the above OS sections */
242 #ifndef ManSuffix
243 # define ManSuffix      1x
244 #endif
245 #ifndef ManDir
246 # define ManDir         $(MANSOURCEPATH)1
247 #endif
248 #ifndef LibManSuffix
249 # define LibManSuffix   3x
250 #endif
251 #ifndef LibmanDir
252 # define LibmanDir      $(MANSOURCEPATH)3
253 #endif
254 #ifndef FileManSuffix
255 # define FileManSuffix  5x
256 #endif
257 #ifndef FileManDir
258 # define FileManDir     $(MANSOURCEPATH)5
259 #endif
260
261 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
262
263 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
264 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
265
266 #include <lnxLib.rules>
267 #include <xfree86.cf>