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 UseInstalledX11 YES
77 #define BuildLibPathVar LD_LIBRARY_PATH
80 #define HasGcc2ForCplusplus YES
81 #define GccUsesGas YES
84 #define HasShadowPasswd YES
87 #define HasSockets YES
89 #define HasMakefileSafeInclude YES
90 #define DependFileName .depend
91 #define DependCmd $(CC) -E -MM -MG
93 #ifdef IncludeMakefile
94 # undef IncludeMakefile
97 #define IncludeMakefile(file) -include file
99 #if (LinuxDistribution == LinuxRedHat)
103 #define AvoidNullMakeCommand YES
104 #define StripInstalledPrograms YES
105 #define CompressAllFonts YES
106 #define Malloc0ReturnsNull YES
107 #define NeedConstPrototypes YES
108 #define NeedFunctionPrototypes YES
109 #define NeedNestedPrototypes YES
110 #define NeedVarargsPrototypes YES
111 #define NeedWidePrototypes NO
112 #define SetTtyGroup YES
114 #define CcCmd gcc -g -pipe
115 #define CplusplusCmd g++ -g -pipe -fpermissive
119 #define CplusplusLibC -lstdc++
120 #define AsmDefines -D__ELF__
122 #define MkdirHierCmd mkdir -p
123 #define CppCmd /lib/cpp
124 #if OSMajorVersion >= 2
125 # define YaccCmd yacc
127 # define YaccCmd bison -y
129 #define LexCmd flex -l
131 #define PreProcessCmd CcCmd -E
132 #define PostIncDir DefaultGccIncludeDir
133 #define LdCombineFlags -r
134 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
135 #define HasWChar32 YES
136 #define StandardCppDefines -traditional -nostdinc StandardDefines
137 #define ExtensionOSDefines -DXTESTEXT1
139 #define LinuxLocaleDefines /**/
141 #define DefaultCCOptions -ansi
143 XCOMM If you have the tirpc library on your system, and you have the
144 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
145 XCOMM your host.def or site.def file. Using the tirpc lib should
146 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
147 XCOMM The default is NO.
150 # define HasTIRPCLib NO
159 #if !defined(DefaultGcc2i386Opt)
160 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings
163 #if LinuxCLibMajorVersion < 6
164 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
165 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
167 # define HasLibCrypt NO
171 # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
172 -D_BSD_SOURCE -D_SVID_SOURCE \
173 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
175 # define HasPosixThreads YES
176 # define ThreadedX YES
177 # define HasThreadSafeAPI YES
178 # define ThreadsLibraries -lpthread
179 # define SystemMTDefines -D_REENTRANT
181 # define HasLibCrypt YES
185 #ifdef SparcArchitecture
186 # define LinuxMachineDefines -Dsparc
189 # define HasPlugin YES
190 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
192 #endif /* SparcArchitecture */
194 #ifdef ARMArchitecture
195 # ifndef OptimizedCDebugFlags
196 # define OptimizedCDebugFlags DefaultGcc2i386Opt
198 # define LinuxMachineDefines -D__arm__
199 # define LSBBitOrder YES
202 # define HasPlugin YES
203 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
205 #endif /* ARMArchitecture */
207 #ifdef i386Architecture
208 # ifndef OptimizedCDebugFlags
209 # define OptimizedCDebugFlags DefaultGcc2i386Opt
211 # define LinuxMachineDefines -D__i386__
212 /* For DtHelp TIFF processing routines. */
213 # define LSBBitOrder YES
216 # define HasPlugin YES
217 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
219 #endif /* i386Architecture */
221 #ifdef AMD64Architecture
222 # ifndef OptimizedCDebugFlags
223 # define OptimizedCDebugFlags DefaultGcc2i386Opt
225 # define LinuxMachineDefines -D__x86_64__
226 /* For DtHelp TIFF processing routines. */
227 # define LSBBitOrder YES
230 # define HasPlugin YES
231 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
233 #endif /* AMD64Architecture */
235 #ifdef PpcArchitecture
236 # ifndef OptimizedCDebugFlags
237 # define OptimizedCDebugFlags DefaultGcc2i386Opt
239 # define LinuxMachineDefines -D__powerpc__
240 #endif /* PpcArchitecture */
242 #ifdef AlphaArchitecture
243 # ifndef OptimizedCDebugFlags
244 # define OptimizedCDebugFlags DefaultGcc2i386Opt
246 # define LinuxMachineDefines -D__alpha__
247 #endif /* AlphaArchitecture */
249 #ifdef Mc68020Architecture
250 # ifndef OptimizedCDebugFlags
251 # define OptimizedCDebugFlags DefaultGcc2i386Opt
253 # define LinuxMachineDefines -D__mc68000__
254 # define StandardCppDefines -traditional
255 #endif /* Mc68020Architecture */
257 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
259 #define ConnectionFlags -DUNIXCONN -DTCPCONN
261 XCOMM This is needed for CDE currently
262 #define CplusplusStandardDefines StandardDefines
264 /* Some of these man page defaults are overriden in the above OS sections */
266 # define ManSuffix 1x
269 # define ManDir $(MANSOURCEPATH)1
272 # define LibManSuffix 3x
275 # define LibmanDir $(MANSOURCEPATH)3
277 #ifndef FileManSuffix
278 # define FileManSuffix 5x
281 # define FileManDir $(MANSOURCEPATH)5
284 #define ArchitectureDefines -DLINUX_ARCHITECTURE
286 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
287 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
289 #include <lnxDep.rules>
290 #include <lnxLib.rules>