linux: move dependancy handling out of linux.cf and into new lnxDep.rules file.
[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. 1997):
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
63 #define UseInstalledX11         YES
64
65 #define BuildLibPathVar         LD_LIBRARY_PATH
66 #define HasGcc                  YES
67 #define HasGcc2                 YES
68 #define HasGcc2ForCplusplus     YES
69 #define GccUsesGas              YES
70 #define UseGas                  YES
71 #define GnuCpp                  YES
72 #define HasShadowPasswd         YES
73 #define HasPutenv               YES
74 #define HasShm                  YES
75 #define HasSockets              YES
76
77 #define HasMakefileSafeInclude  YES
78 #define DependFileName          .depend
79 #define DependCmd               $(CC) -E -MM -MG
80
81 #ifdef IncludeMakefile
82 # undef IncludeMakefile
83 #endif
84
85 #define IncludeMakefile(file)   -include file
86
87 #if (LinuxDistribution == LinuxRedHat)
88 # define HasZlib                YES
89 #endif
90
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
101
102 #define CcCmd                   gcc -g -pipe
103 #define CplusplusCmd            g++ -g -pipe -fpermissive
104 #define AsCmd                   as
105 #define LdCmd                   ld
106
107 #define CplusplusLibC           -lstdc++
108 #define AsmDefines              -D__ELF__
109
110 #define MkdirHierCmd            mkdir -p
111 #define CppCmd                  /lib/cpp
112 #if OSMajorVersion >= 2
113 # define YaccCmd                yacc
114 #else
115 # define YaccCmd                bison -y
116 #endif
117 #define LexCmd                  flex -l
118 #define LexLib                  -lfl
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
126
127 #define LinuxLocaleDefines      /**/
128
129 #define DefaultCCOptions        -ansi
130
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.
136
137 #ifndef HasTIRPCLib
138 # define HasTIRPCLib NO
139 #endif
140
141 #if HasTIRPCLib
142 TIRPCLIB = -ltirpc
143 #else
144 TIRPCLIB = 
145 #endif
146
147 #if !defined(DefaultGcc2i386Opt)
148 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
149 #endif
150
151 #if LinuxCLibMajorVersion < 6
152 # define LinuxSourceDefines     -D_POSIX_SOURCE \
153                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
154 # ifndef HasLibCrypt
155 #  define HasLibCrypt           NO
156 # endif
157
158 #else
159 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
160                                 -D_POSIX_SOURCE \
161                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
162                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
163                                 LinuxLocaleDefines
164 # define HasPosixThreads        YES
165 # define ThreadedX              YES
166 # define HasThreadSafeAPI       YES
167 # define ThreadsLibraries       -lpthread
168 # define SystemMTDefines                -D_REENTRANT
169 # ifndef HasLibCrypt
170 #  define HasLibCrypt           YES
171 # endif
172 #endif
173
174 #ifdef SparcArchitecture
175 # define LinuxMachineDefines -Dsparc
176
177 # if UseElfFormat
178 #  define HasPlugin             YES
179 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
180 # endif
181 #endif /* SparcArchitecture */
182
183 #ifdef ARMArchitecture
184 # define LinuxMachineDefines -D__arm__
185 # define LSBBitOrder             YES
186
187 # if UseElfFormat
188 #  define HasPlugin              YES
189 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
190 # endif 
191 #endif /* ARMArchitecture */
192
193 #ifdef i386Architecture
194 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
195 # define LinuxMachineDefines    -D__i386__
196 /* For DtHelp TIFF processing routines. */
197 # define LSBBitOrder             YES
198
199 # if UseElfFormat
200 #  define HasPlugin             YES
201 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
202 # endif
203 #endif /* i386Architecture */
204
205 #ifdef AMD64Architecture
206 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
207 # define LinuxMachineDefines    -D__x86_64__ 
208 /* For DtHelp TIFF processing routines. */
209 # define LSBBitOrder            YES
210
211 # if UseElfFormat
212 #  define HasPlugin             YES
213 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
214 # endif
215 #endif /* AMD64Architecture */
216
217 #ifdef PpcArchitecture
218 # define OptimizedCDebugFlags    DefaultGcc2i386Opt
219 # define LinuxMachineDefines     -D__powerpc__
220 #endif /* PpcArchitecture */
221
222 #ifdef AlphaArchitecture
223 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
224 # define LinuxMachineDefines    -D__alpha__
225 #endif /* AlphaArchitecture */
226
227 #ifdef Mc68020Architecture
228 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
229 # define LinuxMachineDefines    -D__mc68000__
230 # define StandardCppDefines      -traditional 
231 #endif /* Mc68020Architecture */
232
233 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
234
235 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
236
237 XCOMM This is needed for CDE currently
238 #define CplusplusStandardDefines StandardDefines 
239
240 /* Some of these man page defaults are overriden in the above OS sections */
241 #ifndef ManSuffix
242 # define ManSuffix      1x
243 #endif
244 #ifndef ManDir
245 # define ManDir         $(MANSOURCEPATH)1
246 #endif
247 #ifndef LibManSuffix
248 # define LibManSuffix   3x
249 #endif
250 #ifndef LibmanDir
251 # define LibmanDir      $(MANSOURCEPATH)3
252 #endif
253 #ifndef FileManSuffix
254 # define FileManSuffix  5x
255 #endif
256 #ifndef FileManDir
257 # define FileManDir     $(MANSOURCEPATH)5
258 #endif
259
260 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
261
262 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
263 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
264
265 #include <lnxDep.rules>
266 #include <lnxLib.rules>