linux.cf: add libtirpc support. Disabled by default.
[oweals/cde.git] / cde / config / cf / NetBSD.cf
1 XCOMM platform:  $XConsortium: NetBSD.cf /main/16 1996/10/31 14:47:14 kaleb $
2
3
4
5 XCOMM platform:  $XFree86: xc/config/cf/NetBSD.cf,v 3.44 1996/10/23 13:07:55 dawes Exp $
6
7 #ifndef OpenBSDArchitecture
8
9 #ifndef OSName
10 #define OSName          NetBSD 1.2
11 #endif
12 #ifndef OSMajorVersion
13 #define OSMajorVersion    1
14 #endif
15 #ifndef OSMinorVersion
16 #define OSMinorVersion    2
17 #endif
18 /* 1 = A, 2 = B, 3 = C */
19 #ifndef OSTeenyVersion
20 #define OSTeenyVersion    0
21 #endif
22
23 #else
24
25 #ifndef OSName
26 #define OSName          OpenBSD 2.0
27 #endif
28 #ifndef OSMajorVersion
29 #define OSMajorVersion    2
30 #endif
31 #ifndef OSMinorVersion
32 #define OSMinorVersion    0
33 #endif
34 /* 1 = A, 2 = B, 3 = C */
35 #ifndef OSTeenyVersion
36 #define OSTeenyVersion    0
37 #endif
38
39 #endif
40
41 #ifndef OSVendor
42 #define OSVendor        /**/
43 #endif
44 XCOMM operating system:  OSName
45
46 /*
47  * C library features
48  */
49 #if defined(OpenBSDArchitecture) || \
50    defined(NetBSDArchitecture) && (OsMajorVersion == 1 && OsMinorVersion >= 2)
51 #  define HasPoll                       YES
52 #endif
53 #define HasNdbm                 YES
54 #define HasPutenv               YES
55 #define HasSnprintf             YES
56 #define HasBSD44Sockets         YES
57 #define Malloc0ReturnsNull      NO
58 #define SetTtyGroup             YES
59 #define DBMLibrary              /**/
60 #ifndef HasLibCrypt
61 # define HasLibCrypt            YES
62 #endif
63 #ifndef HasShm
64 # if OSMajorVersion == 0 && OSMinorVersion == 9 && OSTeenyVersion == 2
65 /*
66  * Shm memory was removed in 0.9B because it was encumbered.
67  * A free version was added in 0.9C
68  */
69 #  define HasShm                NO
70 # else
71 #  define HasShm                YES
72 # endif
73 #endif
74 #define HasWChar32              YES
75 /*
76  * There's a bug in NetBSD 1.0, 1.1 and 1.2 dlsym()
77  */
78 #if !defined(OpenBSDArchitecture) && OSMajorVersion == 1 && OSMinorVersion <= 2
79 #  define HasDlsymBug           YES
80 #endif
81
82 /*
83  * Compiler Features
84  */
85 #undef HasGcc
86 #define HasGcc                  YES
87 #define HasGcc2                 YES
88 #ifndef HasGcc2ForCplusplus
89 #define HasGcc2ForCplusplus     YES
90 #endif
91 #define GccUsesGas              YES
92 #define UseGas                  YES
93 #define GnuCpp                  YES
94
95 /* OpenBSD has gcc 2.7.2.1 which fixes the strength-reduce bug */
96 #ifdef OpenBSDArchitecture
97 #define DefaultGcc2i386Opt      -O2
98 #endif
99
100 #define NeedConstPrototypes     YES
101 #define NeedFunctionPrototypes  YES
102 #define NeedNestedPrototypes    YES
103 #define NeedVarargsPrototypes   YES
104 #define NeedWidePrototypes      NO
105
106 #define MkdirHierCmd            mkdir -p
107
108 #define CppCmd                  /usr/libexec/cpp
109 #define StandardCppDefines      -traditional
110 #define PreProcessCmd           CppCmd
111 #ifndef OpenBSDArchitecture
112 #define PreIncDir               /usr/include
113 #else
114 #define PreIncDir /usr/lib/gcc-lib/i386-unknown-openbsd1.2/2.7.2.1/include
115 #endif
116
117 #undef CcCmd
118 #define CcCmd                   gcc
119 #if UseInstalled
120 #define DefaultCCOptions        /**/
121 #else
122 #define DefaultCCOptions        -ansi -Dasm=__asm
123 #endif
124
125 #define GccGasOption            -DGCCUSESGAS
126 #define AsmDefines              -DUSE_GAS
127
128
129 #ifdef i386Architecture
130 # define OptimizedCDebugFlags   -m486 DefaultGcc2i386Opt
131 # if OSMajorVersion < 1
132 #  define ServerOSDefines       XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
133 # else
134 #  define ServerOSDefines       XFree86ServerOSDefines -DDDXTIME
135 # endif
136 # if OSMajorVersion == 1 && OSMinorVersion >= 1 || OSMajorVersion >= 2
137 #  define ServerExtraSysLibs    -li386
138 # endif
139 #else
140 # define OptimizedCDebugFlags   -O2
141 # if defined(SparcArchitecture)
142 #  define ServerOSDefines       -DDDXOSINIT
143 # else
144 #  define ServerOSDefines       /**/
145 # endif
146 #endif
147 #ifdef i386Architecture
148 # define ServerExtraDefines GccGasOption XFree86ServerDefines
149 # ifndef XFree86ConsoleDefines
150 #  define XFree86ConsoleDefines -DPCCONS_SUPPORT -DPCVT_SUPPORT
151 # endif
152 #else
153 # define ServerExtraDefines GccGasOption
154 #endif
155
156 #define StandardDefines -DCSRG_BASED
157 #define XawI18nDefines  -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
158
159 #if OSMajorVersion > 0
160 # ifndef BuildDynamicLoading
161 # define BuildDynamicLoading    YES
162 # endif
163 #endif
164
165 #ifndef ExtraLibraries
166 #define ExtraLibraries          /**/
167 #endif
168 #ifndef UseGnuMalloc
169 #ifndef OpenBSDArchitecture
170 #  define UseGnuMalloc          YES
171 #else
172 #  define UseGnuMalloc          NO
173 #endif
174 #endif
175 #ifndef GnuMallocLibrary
176 #define GnuMallocLibrary        -lgnumalloc
177 #endif
178
179 /*
180  * Make & install Features
181  */
182
183 #define HasMakefileSafeInclude  YES
184 #define IncludeMakefile(file) @@# dependencies are in .depend
185 #define DependFileName .depend
186 #define AvoidNullMakeCommand    YES
187 #define StripInstalledPrograms  YES
188 #define CompressAllFonts        YES
189 #define DefaultUserPath         .:/bin:/usr/bin:/usr/local/bin:$(BINDIR)
190 #define DefaultSystemPath       /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
191
192 #ifdef  InstallCmd
193 # undef  InstallCmd
194 # define InstallCmd             /usr/bin/install
195 #endif
196
197 #ifndef ExtraFilesToClean
198 # define ExtraFilesToClean      *.core
199 #endif
200
201 /*
202  * Documentation formatting
203  */
204 #define NeqnCmd                 neqn -Tlatin1
205 #define EqnCmd                  eqn -Tps
206 #define TroffCmd                groff -Tps
207
208 /*
209  * To use the NetBSD Aperture driver
210  */
211 #if defined(i386Architecture)
212 #ifndef HasNetBSDApertureDrv
213 #define HasNetBSDApertureDrv    NO
214 #endif
215 #endif
216
217 #define MakeHasPosixVariableSubstitutions       YES
218
219 /*
220  * ForceSubdirs - force make to build subdirectories
221  * 
222  * For BSD 4.4 make 
223  */
224 #define ForceSubdirs(dirs)                                              @@\
225 dirs:   .EXEC                                                           @@\
226         @cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \           @@\
227         $(MAKE) $(MFLAGS) PassCDebugFlags all                           @@\
228                                                                         @@\
229 .EXEC:
230
231 XCOMM Man pages need to be formatted when installed, so override the default
232 XCOMM imake rules.
233
234 #define ManSuffix       1
235 #define FileManSuffix   5
236 #define ManSourcePath   $(MANPATH)/cat
237
238 #define InstallManPageLong(file,destdir,dest)                           @@\
239 all:: file.0                                                            @@\
240                                                                         @@\
241 file.0:: file.man                                                       @@\
242         @if [ -f file.man ]; \                                          @@\
243         then \                                                          @@\
244         cat file.man | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.man; \      @@\
245         cp /tmp/$$$$.man file.0; \                                      @@\
246         $(RM) /tmp/$$$$.man; \                                          @@\
247         fi                                                              @@\
248                                                                         @@\
249 install.man::                                                           @@\
250         MakeDir($(DESTDIR)destdir)                                      @@\
251         -@if [ -f file.0 ]; \                                           @@\
252         then \                                                          @@\
253         $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\
254         fi
255
256 #define InstallGenManPageLong(file,destdir,dest,suffix)                 @@\
257         InstallManPageLong(file,destdir,dest)
258
259 #define InstallMultipleManSuffix(list,dest,suff)                        @@\
260 install.man::                                                           @@\
261         MakeDir($(DESTDIR)dest)                                         @@\
262         case '${MFLAGS}' in *[i]*) set +e;; esac; \                     @@\
263         for i in list; do \                                             @@\
264           (set -x; \                                                    @@\
265           cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.suff; \   @@\
266           $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$$$.suff $(DESTDIR)dest/$$i.0; \  @@\
267           $(RM) /tmp/$$$$.suff); \                                              @@\
268         done
269
270 #define InstallMultipleMan(list,dest)                                   @@\
271         InstallMultipleManSuffix(list,dest,man)
272
273 #define InstallManPageAliases(file,destdir,aliases)                     @@\
274 install.man::                                                           @@\
275         @case '${MFLAGS}' in *[i]*) set +e;; esac; \                    @@\
276         for i in aliases; do \                                          @@\
277                 (set -x; \                                              @@\
278                 $(RM) $(DESTDIR)destdir/$$i.0;\                         @@\
279                 (cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\           @@\
280                 ); \                                                    @@\
281         done
282
283 #define InstallGenManPageAliases(file,destdir,suffix,aliases)           @@\
284         InstallManPageAliases(file,destdir,aliases)
285
286 #include <bsdLib.rules>
287
288 #ifdef i386Architecture
289 # include <xfree86.cf>
290 #endif
291
292 /*
293  * Definitions for the SUN server on NetBSD/sparc
294  */
295 #ifdef SparcArchitecture
296 #ifndef Xsun24Server
297 #define Xsun24Server    NO
298 #endif
299 #ifndef XsunServer
300 #define XsunServer      YES
301 #endif
302 #ifndef XsunMonoServer
303 #define XsunMonoServer  YES
304 #endif
305 #ifndef BuildScreenSaverLibrary
306 #define BuildScreenSaverLibrary YES
307 #endif
308 /*
309  * XFree86 uses its own (more portable) database routines to speed up 
310  * the RGB database lookups
311  * However, if you want to use ndbm anyway, you can set that to NO in 
312  * site.def
313  */
314 #ifndef UseRgbTxt
315 #define UseRgbTxt       YES
316 #endif
317 #endif
318
319 /*
320  * Definition for compiling on MIPS machines
321  */
322 #ifdef MipsArchitecture
323 #define PositionIndependentCFlags
324 #define SharedLibraryLoadFlags -x -shared --whole-archive -soname `echo $@ |
325 sed 's/\.[0-9]*$$//'`
326 #define SharedXtReqs $(XLIBONLY) $(SMLIB) $(ICELIB)
327 #define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB) $(EXTENSIONLIB)
328 #endif