1 XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
4 # define OSName DefaultOSName
7 # define OSMajorVersion DefaultOSMajorVersion
10 # define OSMinorVersion DefaultOSMinorVersion
12 #ifndef OSTeenyVersion
13 # define OSTeenyVersion DefaultOSTeenyVersion
16 #ifndef LinuxDistribution
17 #define LinuxDistribution DefaultLinuxDistribution
19 Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
20 Currently only LinuxSuSE will be figured out automatically.
21 Valid values are (from the list at www.linux.org in Oct. 1997):
38 #ifndef DefaultLinuxCLibMajorVersion
39 # define DefaultLinuxCLibMajorVersion 6
41 #ifndef DefaultLinuxCLibMinorVersion
42 # define DefaultLinuxCLibMinorVersion 0
44 #ifndef DefaultLinuxCLibTeenyVersion
45 # define DefaultLinuxCLibTeenyVersion 0
48 #ifndef LinuxCLibMajorVersion
49 # define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
51 #ifndef LinuxCLibMinorVersion
52 # define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
54 #ifndef LinuxCLibTeenyVersion
55 # define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
58 #ifndef LinuxBinUtilsMajorVersion
59 # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
62 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
63 XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
64 XCOMM binutils: (LinuxBinUtilsMajorVersion)
67 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
68 # define UseElfFormat YES
70 # define UseElfFormat NO
71 # error "Only ELF format is supported on linux"
75 #define BuildLibPathVar LD_LIBRARY_PATH
78 #define HasGcc2ForCplusplus YES
79 #define GccUsesGas YES
82 #define HasShadowPasswd YES
85 #define HasSockets YES
87 #define HasMakefileSafeInclude YES
88 #define DependFileName .depend
89 #define DependCmd $(CC) -E -MM -MG
90 #define M4Cmd /usr/bin/m4
92 #ifdef IncludeMakefile
93 # undef IncludeMakefile
96 #define IncludeMakefile(file) -include file
98 #if (LinuxDistribution == LinuxRedHat)
102 #define AvoidNullMakeCommand YES
103 #define StripInstalledPrograms NO
104 #define CompressAllFonts YES
105 #define Malloc0ReturnsNull YES
106 #define NeedConstPrototypes YES
107 #define NeedFunctionPrototypes YES
108 #define NeedNestedPrototypes YES
109 #define NeedVarargsPrototypes YES
110 #define NeedWidePrototypes NO
111 #define SetTtyGroup YES
113 #define CcCmd gcc -g -pipe
114 #define CplusplusCmd g++ -g -pipe
118 #define CplusplusLibC -lstdc++
119 #define AsmDefines -D__ELF__
121 #define MkdirHierCmd mkdir -p
122 #define CppCmd /lib/cpp
123 #define YaccCmd bison -y
124 #define LexCmd flex -l
126 #define PreProcessCmd CcCmd -E
127 #define PostIncDir DefaultGccIncludeDir
128 #define LdCombineFlags -r
129 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
130 #define HasWChar32 YES
131 #define StandardCppDefines -traditional -nostdinc StandardDefines
132 #define ExtensionOSDefines -DXTESTEXT1
134 #define LinuxLocaleDefines /**/
136 #define DefaultCCOptions -ansi
138 XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
139 #define HasXdmAuth YES
141 XCOMM TIRPC is enabled by default now on Linux. The libtirpc-dev package is
142 XCOMM required for this support. If you cannot use tirpc for some reason,
143 XCOMM can disable it by defining HasTIRPCLib to NO in either
144 XCOMM your host.def or site.def file. Not using the TIRPC lib will require
145 XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
146 XCOMM The default is YES.
149 # define HasTIRPCLib YES
154 TIRPCINC = -I/usr/include/tirpc
160 #if !defined(DefaultGcc2i386Opt)
161 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
165 #if LinuxCLibMajorVersion < 6
166 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
167 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
169 # define HasLibCrypt NO
173 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
174 -D_BSD_SOURCE -D_SVID_SOURCE \
175 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
177 # define HasPosixThreads YES
178 # define ThreadedX YES
179 # define HasThreadSafeAPI YES
180 # define ThreadsLibraries -lpthread
181 # define SystemMTDefines -D_REENTRANT
183 # define HasLibCrypt YES
187 #ifdef SparcArchitecture
188 # define LinuxMachineDefines -Dsparc
191 # define HasPlugin YES
192 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
194 #endif /* SparcArchitecture */
196 #ifdef ARMArchitecture
197 # ifndef OptimizedCDebugFlags
198 # define OptimizedCDebugFlags DefaultGcc2i386Opt
200 # define LinuxMachineDefines -D__arm__
201 # define LSBBitOrder YES
204 # define HasPlugin YES
205 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
207 #endif /* ARMArchitecture */
209 #ifdef i386Architecture
210 # ifndef OptimizedCDebugFlags
211 # define OptimizedCDebugFlags DefaultGcc2i386Opt
213 # define LinuxMachineDefines -D__i386__
214 /* For DtHelp TIFF processing routines. */
215 # define LSBBitOrder YES
218 # define HasPlugin YES
219 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
221 #endif /* i386Architecture */
223 #ifdef AMD64Architecture
224 # ifndef OptimizedCDebugFlags
225 # define OptimizedCDebugFlags DefaultGcc2i386Opt
227 # define LinuxMachineDefines -D__x86_64__
228 /* For DtHelp TIFF processing routines. */
229 # define LSBBitOrder YES
232 # define HasPlugin YES
233 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
235 #endif /* AMD64Architecture */
237 #ifdef AArch64Architecture
238 # ifndef OptimizedCDebugFlags
239 # define OptimizedCDebugFlags -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fno-strict-aliasing
241 # define LinuxMachineDefines -D__aarch64__
242 # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
243 # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
244 #endif /* AArch64Architecture */
247 #ifdef PpcArchitecture
248 # ifndef OptimizedCDebugFlags
249 # define OptimizedCDebugFlags DefaultGcc2i386Opt
251 # define LinuxMachineDefines -D__powerpc__
252 #endif /* PpcArchitecture */
254 #ifdef AlphaArchitecture
255 # ifndef OptimizedCDebugFlags
256 # define OptimizedCDebugFlags DefaultGcc2i386Opt
258 # define LinuxMachineDefines -D__alpha__
259 #endif /* AlphaArchitecture */
261 #ifdef Mc68020Architecture
262 # ifndef OptimizedCDebugFlags
263 # define OptimizedCDebugFlags DefaultGcc2i386Opt
265 # define LinuxMachineDefines -D__mc68000__
266 # define StandardCppDefines -traditional
267 #endif /* Mc68020Architecture */
269 #define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines
271 #define ConnectionFlags -DUNIXCONN -DTCPCONN
273 XCOMM This is needed for CDE currently
274 #define CplusplusStandardDefines StandardDefines
276 /* Some of these man page defaults are overriden in the above OS sections */
278 # define ManSuffix 1x
281 # define ManDir $(MANSOURCEPATH)1
284 # define LibManSuffix 3x
287 # define LibmanDir $(MANSOURCEPATH)3
289 #ifndef FileManSuffix
290 # define FileManSuffix 5x
293 # define FileManDir $(MANSOURCEPATH)5
296 #define ArchitectureDefines -DLINUX_ARCHITECTURE
298 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
300 #define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
302 #include <lnxDep.rules>
303 #include <lnxLib.rules>