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):
37 #ifndef LinuxCLibMajorVersion
38 # define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
40 #ifndef LinuxCLibMinorVersion
41 # define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
43 #ifndef LinuxCLibTeenyVersion
44 # define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
46 #ifndef LinuxBinUtilsMajorVersion
47 # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
50 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
51 XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
52 XCOMM binutils: (LinuxBinUtilsMajorVersion)
55 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
56 # define UseElfFormat YES
58 # define UseElfFormat NO
59 # error "Only ELF format is supported on linux"
63 #define UseInstalledX11 YES
65 #define BuildLibPathVar LD_LIBRARY_PATH
68 #define HasGcc2ForCplusplus YES
69 #define GccUsesGas YES
72 #define HasShadowPasswd YES
75 #define HasSockets YES
77 #define HasMakefileSafeInclude YES
78 #define DependFileName .depend
79 #define DependCmd $(CC) -E -MM -MG
81 #ifdef IncludeMakefile
82 # undef IncludeMakefile
85 #define IncludeMakefile(file) -include file
87 #if (LinuxDistribution == LinuxRedHat)
91 #define AvoidNullMakeCommand YES
92 #define StripInstalledPrograms YES
93 #define CompressAllFonts YES
94 #define Malloc0ReturnsNull YES
95 #define NeedConstPrototypes YES
96 #define NeedFunctionPrototypes YES
97 #define NeedNestedPrototypes YES
98 #define NeedVarargsPrototypes YES
99 #define NeedWidePrototypes NO
100 #define SetTtyGroup YES
102 #define CcCmd gcc -g -pipe
103 #define CplusplusCmd g++ -g -pipe -fpermissive
107 #define CplusplusLibC -lstdc++
108 #define AsmDefines -D__ELF__
110 #define MkdirHierCmd mkdir -p
111 #define CppCmd /lib/cpp
112 #if OSMajorVersion >= 2
113 # define YaccCmd yacc
115 # define YaccCmd bison -y
117 #define LexCmd flex -l
119 #define PreProcessCmd CcCmd -E
120 #define PostIncDir DefaultGccIncludeDir
121 #define LdCombineFlags -r
122 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
123 #define HasWChar32 YES
124 #define StandardCppDefines -traditional StandardDefines
125 #define ExtensionOSDefines -DXTESTEXT1
127 #define LinuxLocaleDefines /**/
129 #define DefaultCCOptions -ansi
131 XCOMM If you have the tirpc library on your system, and you have the
132 XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
133 XCOMM your host.def or site.def file. Using the tirpc lib should
134 XCOMM allow running rpcbind in secure mode (ie: without the -i option).
135 XCOMM The default is NO.
138 # define HasTIRPCLib NO
147 #if !defined(DefaultGcc2i386Opt)
148 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
151 #if LinuxCLibMajorVersion < 6
152 # define LinuxSourceDefines -D_POSIX_SOURCE \
153 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
155 # define HasLibCrypt NO
159 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
161 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
162 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
164 # define HasPosixThreads YES
165 # define ThreadedX YES
166 # define HasThreadSafeAPI YES
167 # define ThreadsLibraries -lpthread
168 # define SystemMTDefines -D_REENTRANT
170 # define HasLibCrypt YES
174 #ifdef SparcArchitecture
175 # define LinuxMachineDefines -Dsparc
178 # define HasPlugin YES
179 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
181 #endif /* SparcArchitecture */
183 #ifdef ARMArchitecture
184 # define LinuxMachineDefines -D__arm__
185 # define LSBBitOrder YES
188 # define HasPlugin YES
189 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
191 #endif /* ARMArchitecture */
193 #ifdef i386Architecture
194 # define OptimizedCDebugFlags DefaultGcc2i386Opt
195 # define LinuxMachineDefines -D__i386__
196 /* For DtHelp TIFF processing routines. */
197 # define LSBBitOrder YES
200 # define HasPlugin YES
201 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
203 #endif /* i386Architecture */
205 #ifdef AMD64Architecture
206 # define OptimizedCDebugFlags DefaultGcc2i386Opt
207 # define LinuxMachineDefines -D__x86_64__
208 /* For DtHelp TIFF processing routines. */
209 # define LSBBitOrder YES
212 # define HasPlugin YES
213 # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
215 #endif /* AMD64Architecture */
217 #ifdef PpcArchitecture
218 # define OptimizedCDebugFlags DefaultGcc2i386Opt
219 # define LinuxMachineDefines -D__powerpc__
220 #endif /* PpcArchitecture */
222 #ifdef AlphaArchitecture
223 # define OptimizedCDebugFlags DefaultGcc2i386Opt
224 # define LinuxMachineDefines -D__alpha__
225 #endif /* AlphaArchitecture */
227 #ifdef Mc68020Architecture
228 # define OptimizedCDebugFlags DefaultGcc2i386Opt
229 # define LinuxMachineDefines -D__mc68000__
230 # define StandardCppDefines -traditional
231 #endif /* Mc68020Architecture */
233 #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
235 #define ConnectionFlags -DUNIXCONN -DTCPCONN
237 XCOMM This is needed for CDE currently
238 #define CplusplusStandardDefines StandardDefines
240 /* Some of these man page defaults are overriden in the above OS sections */
242 # define ManSuffix 1x
245 # define ManDir $(MANSOURCEPATH)1
248 # define LibManSuffix 3x
251 # define LibmanDir $(MANSOURCEPATH)3
253 #ifndef FileManSuffix
254 # define FileManSuffix 5x
257 # define FileManDir $(MANSOURCEPATH)5
260 #define ArchitectureDefines -DLINUX_ARCHITECTURE
262 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
263 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
265 #include <lnxDep.rules>
266 #include <lnxLib.rules>