summaryrefslogtreecommitdiff
path: root/svr4.cf
blob: 46410f0913afee125e23961909c1a3cde0bf8ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
XCOMM $Xorg: svr4.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $



XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.50 2003/11/04 01:25:31 dawes Exp $
/*
 * A default OS name
 */
#ifndef OSName
#ifdef i386Architecture
#define	OSName	UNIX System V/386 Release 4
#else
#define	OSName	UNIX System V Release 4
#endif
#endif
#ifndef OSVendor
#define OSVendor /**/
#endif

/*
 * The default version will be 4.0.0 which should be
 * the least common denominator of all SVR4
 */

#ifndef OSMajorVersion
#define	OSMajorVersion	4
#endif
#ifndef OSMinorVersion
#define	OSMinorVersion	0
#endif
#ifndef OSTeenyVersion
#define	OSTeenyVersion	0
#endif
#ifndef BootstrapCFlags
#ifdef i386Architecture
#define BootstrapCFlags		-DSVR4 -Di386
#else
#ifdef SYSV386
#define BootstrapCFlags		-DSVR4 -Di386
#else
#define BootstrapCFlags		-DSVR4
#endif
#endif
#endif

/* Some stuff that all SVR4s should have */

#ifndef SystemV4
#define SystemV4		YES
#endif
#ifndef HasLdRunPath
#define HasLdRunPath		YES
#endif
#define HasPoll			YES
#ifndef SVR4Architecture
#define SVR4Architecture
#endif
#ifndef PatheticCpp
#define PatheticCpp		YES
#endif
#define Malloc0ReturnsNull	YES		/* in case -lmalloc used */

/*
 * Here are the default paths to use to pick up tools for building.
 */
#ifndef ArCmdBase
#define	ArCmdBase	/usr/ccs/bin/ar
#endif
#ifndef AsCmd
#define	AsCmd	/usr/ccs/bin/as
#endif
#ifndef CppCmd
#define	CppCmd	/usr/ccs/lib/cpp
#endif
#ifndef RawCppCmd
#if !defined(SunArchitecture)
#define RawCppCmd CppCmd -Uunix -Ui386
#endif
#endif
#ifndef LdCmd
#define	LdCmd	/usr/ccs/bin/ld
#endif
#ifndef LexCmd
#define	LexCmd	/usr/ccs/bin/lex
#endif
#ifndef MakeCmd
#define	MakeCmd	/usr/ccs/bin/make
#endif
#ifndef YaccCmd
#define	YaccCmd	/usr/ccs/bin/yacc
#endif
#ifndef MkdirHierCmd
#define MkdirHierCmd mkdir -p
#endif

/*
 * Add the s option to ArCmd and ArAddCmd so that empty archives can be created
 */
#ifndef ArCmd
#define ArCmd ArCmdBase cqs
#endif
#ifndef ArAddCmd
#define ArAddCmd ArCmdBase rus
#endif

/* Libtool on SVR4 uses minor numbers */
#ifndef LibtoolMinorVersions
#define LibtoolMinorVersions    YES
#endif

#ifndef SunArchitecture
/*
 * These come from usl.cf, and at least some are required by other
 * SVR4 versions
 */
#ifndef UseLocalRegex
#define UseLocalRegex		YES
#endif
#ifndef XmDefines
#define XmDefines		\
	-DNO_REGCOMP -DNEED_STRCASECMP \
	-DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
#endif
#ifndef DtSvcDefines
#define DtSvcDefines		-DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
#endif
#ifndef DtSearchDefines
#define DtSearchDefines		-DI18N_MSG DtSvcDefines
#endif
#ifndef DtWidgetDefines
#define DtWidgetDefines		DtSearchDefines
#endif
#ifndef DtPrintDefines
#define DtPrintDefines		DtSearchDefines
#endif
#ifndef HasStrcasecmp
#define HasStrcasecmp		NO
#endif
#endif

/* SVR4 (including Solaris) doesn't have setenv() and unsetenv() */
#ifndef HasSetenv
#define HasSetenv		NO
#endif

#ifndef SunArchitecture
#if (OSMinorVersion == 0)
#ifndef XawI18nDefines
#define XawI18nDefines		-DUSE_XWCHAR_STRING
#endif
#ifndef UseSmartScheduler
#define UseSmartScheduler	NO
#endif
#endif
#ifdef i386Architecture
#ifndef HasPosixRegex
#define HasPosixRegex		NO
#endif
#endif
#ifndef LogDirectory
#define LogDirectory		$(VARDIR)/adm
#endif
#endif

#ifndef HasGcc3
#define HasGcc3 NO
#endif
#ifndef HasGcc2
#define HasGcc2 HasGcc3
#endif
#ifndef HasGcc
#define HasGcc HasGcc2
#endif

#ifndef HasPerl
#define HasPerl			NO
#endif

#ifdef i386Architecture
#ifndef SunArchitecture
#if (OSMinorVersion > 2) || ((OSMinorVersion == 2) && (OSTeenyVersion >= 2))
#ifndef StandardDefines
#define StandardDefines		-DSVR4 -DSVR42MP -Di386
#endif
#ifndef HasParallelMake
#define HasParallelMake		YES
#endif
#if HasParallelMake
#define TopParallelDefines	-P -B
#define MutexDirective		.MUTEX
#endif
#else /* SVR4 < 4.2.2 */
#ifndef StandardDefines
#define StandardDefines		-DSVR4 -Di386
#endif
#endif
#endif
#ifndef ToolkitStringsABIOptions
#define ToolkitStringsABIOptions -intelabi -earlyR6bc
#endif
#ifndef DefaultCCOptions
#if !HasGcc
#define DefaultCCOptions -Xa -Dasm=__asm
#endif
#endif
#ifndef DefaultCDebugFlags
#if HasGcc
#if HasGcc2
#ifndef CcCmd
#define CcCmd gcc
#endif
#define DefaultCDebugFlags DefaultGcc2i386Opt
#else
#define DefaultCDebugFlags -O2
#endif
#else
#define DefaultCDebugFlags -O
#endif
#endif
#ifndef ServerOSDefines
#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
#endif
#endif

/*
 * The TLI interface is more robust on most SVR4s, so it will be the default.
 */
#if !defined(SunArchitecture)
#ifndef ConnectionFlags
#define ConnectionFlags	-DSTREAMSCONN -DUNIXCONN -DLOCALCONN
#endif
#endif

#ifndef ManSuffix
#define ManSuffix               1x
#define ManDir			$(MANSOURCEPATH)1
#endif
#ifndef LibManSuffix
#define LibManSuffix            3x
#define LibmanDir		$(MANSOURCEPATH)3
#endif
#ifndef FileManSuffix
#define FileManSuffix           4
#endif

#ifndef StaticLibrary
#if !HasGcc
#define StaticLibrary(libpath,libname) -B static Concat(-L,libpath) Concat(-l,libname) -B dynamic
#endif
#endif

#ifndef SharedLibXdmGreet
#define SharedLibXdmGreet	HasSharedLibraries
#endif

/*
 * At this point, an XFree86 port to Sparc/SunOS cannot be officially supported
 * because the system I am using to develop this is just a loaner from Sun.
 */
#if defined(i386Architecture) || defined(AMD64Architecture) || \
    defined(PpcArchitecture) || \
    (defined(SparcArchitecture) && \
     defined(SunArchitecture) && \
     (!defined(XorgServer) || (XorgServer)))
#ifndef DoLoadableServer
#define DoLoadableServer	YES
#endif
#include <xorg.cf>
#endif

#ifndef DoLoadableServer
# define DoLoadableServer	NO
#endif
#ifndef GccWarningOptions
# define GccWarningOptions	/* */
#endif
#ifndef XFree86ServerDefines
# define XFree86ServerDefines	/* */
#endif
#ifndef XFree86ServerOSDefines
# define XFree86ServerOSDefines -DDDXOSINIT
#endif

#if HasGcc2ForCplusplus
# ifndef CplusplusLibCDir
#  define CplusplusLibCDir	/usr/local/lib
# endif
#endif

#include <sv4Lib.rules>