Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code
[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 #ifndef OSName
4 #define OSName                  DefaultOSName
5 #endif
6 #ifndef OSMajorVersion
7 #define OSMajorVersion          DefaultOSMajorVersion
8 #endif
9 #ifndef OSMinorVersion
10 #define OSMinorVersion          DefaultOSMinorVersion
11 #endif
12 #ifndef OSTeenyVersion
13 #define OSTeenyVersion          DefaultOSTeenyVersion
14 #endif
15
16 #ifndef LinuxDistribution 
17 #define LinuxDistribution       DefaultLinuxDistribution
18 /*
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. '97):
22     LinuxUnknown    (0)
23     LinuxSuSE       (1)
24     LinuxCaldera    (2)
25     LinuxCraftworks (3)
26     LinuxDebian     (4)
27     LinuxInfoMagic  (5)
28     LinuxKheops     (6)
29     LinuxPro        (7)
30     LinuxRedHat     (8)
31     LinuxSlackware  (9)
32     LinuxTurbo      (10)
33     LinuxWare       (11)
34     LinuxYggdrasil  (12)
35 */
36 #endif
37 #ifndef LinuxCLibMajorVersion
38 #define LinuxCLibMajorVersion   DefaultLinuxCLibMajorVersion
39 #endif
40 #ifndef LinuxCLibMinorVersion
41 #define LinuxCLibMinorVersion   DefaultLinuxCLibMinorVersion
42 #endif
43 #ifndef LinuxCLibTeenyVersion
44 #define LinuxCLibTeenyVersion   DefaultLinuxCLibTeenyVersion
45 #endif
46 #ifndef LinuxBinUtilsMajorVersion
47 #define LinuxBinUtilsMajorVersion       DefaultLinuxBinUtilsMajorVersion
48 #endif
49
50 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
51 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
52 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
53
54 #ifndef UseElfFormat
55 #if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
56 #define UseElfFormat            YES
57 #else
58 #define UseElfFormat            NO
59 #error "Only ELF format is supported on linux"
60 #endif
61 #endif
62 #define BuildLibPathVar         LD_LIBRARY_PATH
63 #define HasGcc                  YES
64 #define HasGcc2                 YES
65 #define HasGcc2ForCplusplus     YES
66 #define GccUsesGas              YES
67 #define UseGas                  YES
68 #define GnuCpp                  YES
69 #define HasShadowPasswd         YES
70 #define HasPutenv               YES
71 #define HasShm                  YES
72 #define HasSockets              YES
73 #if (LinuxDistribution == LinuxRedHat)
74 #define HasZlib                 YES
75 #endif
76
77 #define AvoidNullMakeCommand    YES
78 #define StripInstalledPrograms  YES
79 #define CompressAllFonts        YES
80 #define Malloc0ReturnsNull      YES
81 #define NeedConstPrototypes     YES
82 #define NeedFunctionPrototypes  YES
83 #define NeedNestedPrototypes    YES
84 #define NeedVarargsPrototypes   YES
85 #define NeedWidePrototypes      NO
86 #define SetTtyGroup             YES
87
88 #define CcCmd                   gcc -g -pipe
89 #define CplusplusCmd            g++ -g -pipe -fpermissive 
90 #define AsCmd                   as
91 #define LdCmd                   ld
92
93 #define CplusplusLibC           -lstdc++
94 #define AsmDefines              -D__ELF__
95
96 #define MkdirHierCmd            mkdir -p
97 #define CppCmd                  /lib/cpp
98 #if OSMajorVersion >= 2
99 #define YaccCmd                 yacc
100 #else
101 #define YaccCmd                 bison -y
102 #endif
103 #define LexCmd                  flex -l
104 #define LexLib                  -lfl
105 #define PreProcessCmd           CcCmd -E
106 #define PostIncDir              DefaultGccIncludeDir
107 #define LdCombineFlags          -r
108 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
109 #define HasWChar32              YES
110 #define StandardCppDefines      -traditional StandardDefines
111 #define ExtensionOSDefines      -DXTESTEXT1
112
113 #define LinuxLocaleDefines      /**/
114
115 #if LinuxCLibMajorVersion < 6
116 # define LinuxSourceDefines     -D_POSIX_SOURCE \
117                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
118 # ifndef HasLibCrypt
119 #  define HasLibCrypt           NO
120 # endif
121
122 #else
123 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
124                                 -D_POSIX_SOURCE \
125                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
126                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
127                                 LinuxLocaleDefines
128 # define HasPosixThreads        YES
129 # define ThreadedX              YES
130 # define HasThreadSafeAPI       YES
131 # define ThreadsLibraries       -lpthread
132 # define SystemMTDefines                -D_REENTRANT
133 # ifndef HasLibCrypt
134 #  define HasLibCrypt           YES
135 # endif
136 #endif
137
138 #ifdef SparcArchitecture
139 #define LinuxMachineDefines -Dsparc
140
141 #if UseElfFormat
142 #define HasPlugin               YES
143 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
144 #endif
145 #endif /* SparcArchitecture */
146
147 #ifdef ARMArchitecture
148 #define LinuxMachineDefines -D__arm__
149 #define LSBBitOrder             YES
150
151 #if UseElfFormat
152 #define HasPlugin               YES
153 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
154 #endif 
155 #endif /* ARMArchitecture */
156
157 #ifdef i386Architecture
158 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
159 #define LinuxMachineDefines     -D__i386__
160 /* For DtHelp TIFF processing routines. */
161 #define LSBBitOrder             YES
162
163 #if UseElfFormat
164 #define HasPlugin               YES
165 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
166 #endif
167 #endif /* i386Architecture */
168
169 #ifdef AMD64Architecture
170 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
171 #define LinuxMachineDefines     -D__x86_64__ 
172 /* For DtHelp TIFF processing routines. */
173 #define LSBBitOrder             YES
174
175 #if UseElfFormat
176 #define HasPlugin               YES
177 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
178 #endif
179 #endif /* AMD64Architecture */
180
181 #ifdef PpcArchitecture
182 #define OptimizedCDebugFlags    -O2
183 #define LinuxMachineDefines     -D__powerpc__
184 #endif /* PpcArchitecture */
185
186 #ifdef AlphaArchitecture
187 #define OptimizedCDebugFlags    -O2
188 #define LinuxMachineDefines     -D__alpha__
189 #endif /* AlphaArchitecture */
190
191 #ifdef Mc68020Architecture
192 #define OptimizedCDebugFlags    -O2
193 #define LinuxMachineDefines     -D__mc68000__
194 #define StandardCppDefines      -traditional 
195 #endif /* Mc68020Architecture */
196
197 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
198
199 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
200
201 XCOMM This is needed for CDE currently
202 #define CplusplusStandardDefines StandardDefines 
203
204 /* Some of these man page defaults are overriden in the above OS sections */
205 #ifndef ManSuffix
206 # define ManSuffix      1x
207 #endif
208 #ifndef ManDir
209 # define ManDir         $(MANSOURCEPATH)1
210 #endif
211 #ifndef LibManSuffix
212 # define LibManSuffix   3x
213 #endif
214 #ifndef LibmanDir
215 # define LibmanDir      $(MANSOURCEPATH)3
216 #endif
217 #ifndef FileManSuffix
218 # define FileManSuffix  5x
219 #endif
220 #ifndef FileManDir
221 # define FileManDir     $(MANSOURCEPATH)5
222 #endif
223
224 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
225
226 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
227 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
228
229 #include <lnxLib.rules>
230 #include <xfree86.cf>