Enable the use of the TIRPC library on Linux.
[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 /* To reduce the number of warnings generated by X11 and Motif headers that
4    dislike -ansi and -pedantic we can include them with -isystem instead of
5    -I, this tells GCC to treat them as system includes out of our control */
6 #define TopXInclude -isystem$(TOP)/imports/x11/include
7
8 #ifndef OSName
9 # define OSName                 DefaultOSName
10 #endif
11 #ifndef OSMajorVersion
12 # define OSMajorVersion         DefaultOSMajorVersion
13 #endif
14 #ifndef OSMinorVersion
15 # define OSMinorVersion         DefaultOSMinorVersion
16 #endif
17 #ifndef OSTeenyVersion
18 # define OSTeenyVersion         DefaultOSTeenyVersion
19 #endif
20
21 #ifndef LinuxDistribution 
22 #define LinuxDistribution       DefaultLinuxDistribution
23 /*
24   Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
25   Currently only LinuxSuSE will be figured out automatically.
26   Valid values are (from the list at www.linux.org in Oct. 1997):
27     LinuxUnknown    (0)
28     LinuxSuSE       (1)
29     LinuxCaldera    (2)
30     LinuxCraftworks (3)
31     LinuxDebian     (4)
32     LinuxInfoMagic  (5)
33     LinuxKheops     (6)
34     LinuxPro        (7)
35     LinuxRedHat     (8)
36     LinuxSlackware  (9)
37     LinuxTurbo      (10)
38     LinuxWare       (11)
39     LinuxYggdrasil  (12)
40 */
41 #endif
42 #ifndef LinuxCLibMajorVersion
43 # define LinuxCLibMajorVersion   DefaultLinuxCLibMajorVersion
44 #endif
45 #ifndef LinuxCLibMinorVersion
46 # define LinuxCLibMinorVersion   DefaultLinuxCLibMinorVersion
47 #endif
48 #ifndef LinuxCLibTeenyVersion
49 # define LinuxCLibTeenyVersion   DefaultLinuxCLibTeenyVersion
50 #endif
51 #ifndef LinuxBinUtilsMajorVersion
52 # define LinuxBinUtilsMajorVersion      DefaultLinuxBinUtilsMajorVersion
53 #endif
54
55 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
56 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
57 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
58
59 #ifndef UseElfFormat
60 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
61 #  define UseElfFormat          YES
62 # else
63 #  define UseElfFormat          NO
64 #  error "Only ELF format is supported on linux"
65 # endif
66 #endif
67
68 #define BuildLibPathVar         LD_LIBRARY_PATH
69 #define HasGcc                  YES
70 #define HasGcc2                 YES
71 #define HasGcc2ForCplusplus     YES
72 #define GccUsesGas              YES
73 #define UseGas                  YES
74 #define GnuCpp                  YES
75 #define HasShadowPasswd         YES
76 #define HasPutenv               YES
77 #define HasShm                  YES
78 #define HasSockets              YES
79 #if (LinuxDistribution == LinuxRedHat)
80 # define HasZlib                YES
81 #endif
82
83 #define AvoidNullMakeCommand    YES
84 #define StripInstalledPrograms  YES
85 #define CompressAllFonts        YES
86 #define Malloc0ReturnsNull      YES
87 #define NeedConstPrototypes     YES
88 #define NeedFunctionPrototypes  YES
89 #define NeedNestedPrototypes    YES
90 #define NeedVarargsPrototypes   YES
91 #define NeedWidePrototypes      NO
92 #define SetTtyGroup             YES
93
94 #define CcCmd                   gcc -g -pipe
95 #define CplusplusCmd            g++ -g -pipe -fpermissive
96 #define AsCmd                   as
97 #define LdCmd                   ld
98
99 #define CplusplusLibC           -lstdc++
100 #define AsmDefines              -D__ELF__
101
102 #define MkdirHierCmd            mkdir -p
103 #define CppCmd                  /lib/cpp
104 #if OSMajorVersion >= 2
105 # define YaccCmd                yacc
106 #else
107 # define YaccCmd                bison -y
108 #endif
109 #define LexCmd                  flex -l
110 #define LexLib                  -lfl
111 #define PreProcessCmd           CcCmd -E
112 #define PostIncDir              DefaultGccIncludeDir
113 #define LdCombineFlags          -r
114 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
115 #define HasWChar32              YES
116 #define StandardCppDefines      -traditional StandardDefines
117 #define ExtensionOSDefines      -DXTESTEXT1
118
119 #define LinuxLocaleDefines      /**/
120
121 XCOMM Using the tirpc lib should allow running rpcbind in secure
122 XCOMM mode (ie: without the -i option).  Make sure you install the 
123 XCOMM libtirpc-dev package or equivalent.
124
125 #define HasTIRPCLib  YES
126
127 #if HasTIRPCLib
128 TIRPCLIB = -ltirpc
129 #else
130 TIRPCLIB = 
131 #endif
132
133 #if !defined(DefaultGcc2i386Opt)
134 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
135 #endif
136
137 #if LinuxCLibMajorVersion < 6
138 # define LinuxSourceDefines     -D_POSIX_SOURCE \
139                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
140 # ifndef HasLibCrypt
141 #  define HasLibCrypt           NO
142 # endif
143
144 #else
145 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
146                                 -D_POSIX_SOURCE \
147                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
148                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
149                                 LinuxLocaleDefines
150 # define HasPosixThreads        YES
151 # define ThreadedX              YES
152 # define HasThreadSafeAPI       YES
153 # define ThreadsLibraries       -lpthread
154 # define SystemMTDefines                -D_REENTRANT
155 # ifndef HasLibCrypt
156 #  define HasLibCrypt           YES
157 # endif
158 #endif
159
160 #ifdef SparcArchitecture
161 # define LinuxMachineDefines -Dsparc
162
163 # if UseElfFormat
164 #  define HasPlugin             YES
165 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
166 # endif
167 #endif /* SparcArchitecture */
168
169 #ifdef ARMArchitecture
170 # define LinuxMachineDefines -D__arm__
171 # define LSBBitOrder             YES
172
173 # if UseElfFormat
174 #  define HasPlugin              YES
175 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
176 # endif 
177 #endif /* ARMArchitecture */
178
179 #ifdef i386Architecture
180 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
181 # define LinuxMachineDefines    -D__i386__
182 /* For DtHelp TIFF processing routines. */
183 # define LSBBitOrder             YES
184
185 # if UseElfFormat
186 #  define HasPlugin             YES
187 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
188 # endif
189 /* add this to void screenfuls of warnings from makedepend */
190 # define DependFlags -I/usr/include/i386-linux-gnu
191 #endif /* i386Architecture */
192
193 #ifdef AMD64Architecture
194 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
195 # define LinuxMachineDefines    -D__x86_64__ 
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 /* add this to void screenfuls of warnings from makedepend */
204 # define DependFlags -I/usr/include/x86_64-linux-gnu
205 #endif /* AMD64Architecture */
206
207 #ifdef PpcArchitecture
208 # define OptimizedCDebugFlags    DefaultGcc2i386Opt
209 # define LinuxMachineDefines     -D__powerpc__
210 #endif /* PpcArchitecture */
211
212 #ifdef AlphaArchitecture
213 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
214 # define LinuxMachineDefines    -D__alpha__
215 #endif /* AlphaArchitecture */
216
217 #ifdef Mc68020Architecture
218 # define OptimizedCDebugFlags   DefaultGcc2i386Opt
219 # define LinuxMachineDefines    -D__mc68000__
220 # define StandardCppDefines      -traditional 
221 #endif /* Mc68020Architecture */
222
223 #ifdef HasGcc2
224 CXXDEPENDINCLUDE = $(shell CppCmd -x c++ -Wp,-v < /dev/null \
225                    2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p')
226 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
227 #endif
228 #define DependDefines           -D_SYS_RESOURCE_H -D_SYS_UTSNAME_H
229
230 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
231
232 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
233
234 XCOMM This is needed for CDE currently
235 #define CplusplusStandardDefines StandardDefines 
236
237 /* Some of these man page defaults are overriden in the above OS sections */
238 #ifndef ManSuffix
239 # define ManSuffix      1x
240 #endif
241 #ifndef ManDir
242 # define ManDir         $(MANSOURCEPATH)1
243 #endif
244 #ifndef LibManSuffix
245 # define LibManSuffix   3x
246 #endif
247 #ifndef LibmanDir
248 # define LibmanDir      $(MANSOURCEPATH)3
249 #endif
250 #ifndef FileManSuffix
251 # define FileManSuffix  5x
252 #endif
253 #ifndef FileManDir
254 # define FileManDir     $(MANSOURCEPATH)5
255 #endif
256
257 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
258
259 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
260 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
261
262 #include <lnxLib.rules>
263 #include <xfree86.cf>