-
Notifications
You must be signed in to change notification settings - Fork 0
/
m4.setup
383 lines (348 loc) · 12.7 KB
/
m4.setup
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
define(`concat',$1$2$3$4$5$6$7$8$9)
changequote([,])
# os - one of:
# "bsd" - bsd 4.2, bsd 4.3, ultrix 1.1, acis 4.2,4.3 other
# "standard" bsd systems without nfs
# "ultrix12" - Ultrix 1.2
# "ultrix20" - Ultrix 2.0 or greater
# "ultrix40" - Ultrix 4.0 or greater
# "hpux" - HP/UX
# "aux" - A/UX
# "xenix5" - SCO Xenix System V
# "aix" - IBM AIX System V
# "pyr" - pyramid (in BSD universe)
# "sunos" - SunOS
# "encore" - Encore MultiMax
# "next" - NeXT/MACH
# "dynix" - Sequent Balance
# "irix" - Silicon Graphics IRIS-4D/IRIX
# Warning: hpux, pyr are hardcoded in some of the makefiles (sorry)
# MAJOR CONFIGURATION
# set to one of the above (or configure your own below)
define([os],[sunos])
# System call configuration (not for system v compatibilty)
# known: X_GETOPT, X_VPRINTF, X_GETMNT, X_STATFS, X_QUOTA,
# X_SUNQUOTA, X_FLOCK, X_LOCKF, X_FCNTLLOCKF
# getopt - "cap: argument processing"
define([X_GETOPT],1)
# getmnt - "aufs: info on file systems (dec)"
# define([X_GETMNT],1)
# statfs - "aufs: info on file systems (sun nfs)"
define([X_STATFS],1)
# quota - "aufs: info on user quota"
# define([X_QUOTA],1)
# getmntent - "aufs: used by sunquota"
define([X_SUNQUOTA],1)
# flock - "afp: file locking"
define([X_FLOCK],1)
# lockf - "afp: byte range locking using unistd.h"
define([X_LOCKF],1)
# lockf - "afp: byte range locking using fcntl.h"
# define([X_FCNTLLOCKF],1)
# vfprintf - "cap: variable arg fprintf"
define([X_VPRINTF],1)
# recvmsg - "cap: lib: scatter gather recv"
# define([X_NORECVMSG],1)
# sendmsg - "cap: lib: scatter gather send"
# define([X_NOSENDMSG],1)
# ffs - "cap: lib: ffs - find first set bit"
# define([X_NOFFS],1)
# GETOPT support
ifdef([X_GETOPT],[],[define([needgetopt],[att_getopt.o])])
# VPRINTF support
ifdef([X_VPRINTF],[define([usevprintf], 1)],[])
# Path to cap sources: useful for testing
define([cwd],[/home/munnari/staff/djh/src/cap60.beta])
# turn on if your system sends packets very quickly
# (see applications/aufs/INSTALLATION)
# define([fastether],1) # For papif and samples
# The following selects the correct lap delivery objects
define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])
# This determines what happens to UAB
define([uabprogs],[])
define([uabplibs],[])
define([uabpobjs],[])
# This sets up Native EtherTalk support
define([etherprogs],[])
define([etherpobjs],[])
# The following selects byteswapping or otherwise
# define([usebyteswap],1)
# uncomment if your param.h includes types.h and types.h doesn't
# prevent itself from being included twice
# define _TYPES
# define([selfdefinetypes],1)
# MINOR CONFIGURATION: configure various programs
#define([columbia],1) # so columbia can do things quickly
#define([debug],1) # testing things (without disrupting)
# location of include files
define([includedir],[[/usr/include]])
# location of des subroutine source (see lib/afp/README)
define([desloc],[[../../extras]])
# location of atalk.local, etc.
define([etcdest],[[/etc]])
ifdef([columbia],[define([etcdest],[[/usr/local/lib/cap]])])
# location of user cap programs
define([capdestdir],[[/usr/local/cap]])
# location of cap "server" programs (aufs, lwsrv, papif, uab etc.)
define([capsrvrdestdir],[[/usr/local/cap]])
# location of some cap data files
define([caplibdestdir],[[/usr/local/lib/cap]])
# location of cap libraries
define([libdestdir],[[/usr/local/lib]])
# override for aux (doesn't search /usr/local/lib)
ifelse(os,[aux],[define([libdestdir],[[/usr/lib]])])
# cap library names
define([caplib],[[libcap.a]])
define([afplib],[[libafp.a]])
define([afpclib],[[libafpc.a]])
# names to load cap libraries with
define([libcap],[[-lcap]])
define([libafp],[[-lafp]])
define([libafpc],[[-lafpc]])
ifelse(os,[encore],
[define([libcap],concat([-L],libdestdir,[ ],libcap))])
ifelse(os,[encore],
[define([libafp],concat([-L],libdestdir,[ ],libafp))])
ifelse(os,[encore],
[define([libafpc],concat([-L],libdestdir,[ ],libafpc))])
ifelse(os,[aix],
[define([libcap],concat([-L],libdestdir,[ ],libcap))])
ifelse(os,[aix],
[define([libafp],concat([-L],libdestdir,[ ],libafp))])
ifelse(os,[aix],
[define([libafpc],concat([-L],libdestdir,[ ],libafpc))])
# any special libraries
define([libspecial],[])
ifelse(os,[xenix5],[
define([libspecial],concat(libspecial,[ -lsocket]))])
ifelse(os,[dynix],[
define([libspecial],concat(libspecial,[ -lseq]))])
ifelse(os,[irix],[
define([libspecial],concat(libspecial,[ -lbsd]))])
ifelse(os,[aix],[
define([libspecial],concat(libspecial,[ -lbsd]))])
ifelse(os,[aux],[
define([libspecial],concat(libspecial,[ -lat]))])
#
# special configurations for individual source files
#
#
# Aufs: see applications/aufs/INSTALLATION
#
# WARNING: OS DEPENDENT
# define([smartunixfinderinfo],1)
#
# Valid here are -DNONXLATE, -DFULL_NCS_SUPPORT
# or GGTYPE="gid_t"
# Others: USESTATFS, USEGETMNT, USECHOWN, USEQUOTA, USESUNQUOTA
# are autoconfigured
define([aufsosdefs],[])
#
# lib/cap/authenticate.c: configuration file
#
define([authconfig],[[\"/etc/cap.auth\"]])
#
# lwsrv: see applications/lwsrv/README
#
# Valid is: -DADOBE_DSC2_CONFORMANT
define([simpleflags],[])
#
# Valid are: -DDOCNAME, -DPAGECOUNT=buffer_size
define([lwflags],[-DDOCNAME -DPAGECOUNT=512])
# and more later ...
#
# lwrename: set name of file containing list of printers to be renamed
#
define([lwrenamefile],[[\"/usr/local/lib/cap/lwrename.list\"]])
#
# papif: see applications/papif/README
#
# uncomment and set to right location to turn on printing "plain text files"
# define([pstextloc],[[\"/usr/local/lib/ps/pstext\"]])
#
# uncomment and set to right location to turn on page reversal
# define([psrevloc],[[\"/usr/local/lib/ps/psrev\"]])
#
# Valid are:
# -DVERBOSELOG - default (set =0 to turn off)
# -DNO_STRUCT - default is on (structured)
# -DNOACCT - default is on (accounting)
# -DIDLESTUFF - default is off
# -DSFLOWQ - default is 8 (min 1, max 8)
# -DRFLOWQ - default is 8 (min 1, max 8)
# -DATPRESPONSETIMEOUT - default is 120 (2 minutes) - in seconds
# -DWATCHTIME - default is 10 seconds (in seconds)
# -DDEBUG - default is off
# -DSTRIPCONTROLD - default is off
# -DMAPCRTOLF - default is off
# -DMACUSER - default is off (need LPD_JOB environment variable in lpd)
# see papif README file for explanations of the above
# The following defines are recommended for System V lp printers (vs. bsd lpd)
# -DWATCHTIME=0 (no status) -DNOACCT
define([papflags],[-DMACUSER])
define([papflags],concat(papflags,[ -DIDLESTUFF]))
# Set -DBANNERFIRST if you want the banner page to come out as the
# first page instead of the last page
# Set -DBANNERLAST if want it last
# Set -DPSBANNER if you want a custom PostScipt Banner (must specify
# short banners in printcap). This still defaults to regular banners
# Add -DCHARGEBANNER if you want to charge the banner page to the user
# on system V - there is no accounting, so leave blank
define([papbanner],[-DCHARGEBANNER])
# for cap.printers - uncomment and change the following line to point
# papif, et. al. to a location other than /etc/cap.printers. (Note:
# line below would set it to $etcdir/cap.printers)
# define([capprinters],concat([\"],etcdest,[/],[cap.printers],[\"]))
ifdef([columbia],
[define([capprinters],concat([\"],etcdest,[/],[cap.printers],[\"]))])
# for atalkdbm - allows change following line(s) to modify atalk.local
# (probably shouldn't). Remember that atalk.local is expected to
# be in etcdest
define([atalklocal],concat([\"],etcdest,[/],[atalk.local],[\"]))
define([configdir],concat([\"],etcdest,[\"]))
# in case you want to globally change the c compiler
define([thecompiler],[cc])
define([theloader],[ld])
define([theinstaller],[cp])
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# END OF CONFIGABLE OPTIONS #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# You should only edit past here if you are "porting"
# Automatics
define([osname],
ifelse( os,[ultrix12],[Ultrix 1.2],
os,[ultrix20],[Ultrix 2.0],
os,[ultrix40],[Ultrix 4.0],
os,[aux],[A/UX],
os,[sunos],[SunOS],
os,[encore],[Encore Umax],
os,[hpux],[HP-UX (for 9000 series)],
os,[bsd],[Standard BSD],
os,[pyr],[Pyramid in BSD universe],
os,[xenix5],[SCO Xenix System V],
os,[aix],[IBM AIX System V],
os,[next],[NeXT/MACH],
os,[dynix],[Sequent Balance],
os,[irix],[Silicon Graphics IRIS/IRIX],
[Unknown]))
define([cflags],ifdef([selfdefinetypes],[-D_TYPES],[]))
define([cflags],concat(cflags,ifdef([usebyteswap],[ -DBYTESWAPPED],[])))
define([bigcflags],ifelse(os,[hpux],[+Nd2000 +Ns2000]))
# The encore optimiser is slightly over zealous
ifelse(os,[encore],[],[
define([cflags],concat(cflags,[ -O]))])
ifelse(os,[pyr],[
define([cflags],concat(cflags,[ -q]))])
ifelse(os,[next],[
define([cflags],concat(cflags,[ -DNeXT -DADDRINPACK]))])
ifelse(os,[xenix5],[
define([cflags],concat(cflags,[ -Dxenix5 -I$I -DLAI_TCP -Di386]))])
ifelse(os,[aix],[
define([cflags],concat(cflags,[ -DAIX -DUSETIMES -DNOWAIT3 -DUSEDIRENT]))])
ifelse(os,[irix],[
define([cflags],concat(cflags,[ -D_BSD_COMPAT]))])
# was used for nbp, but found we needed more... leave in case
define([nbpflags],[])
define([lflags],[])
define([mflags],[])
# aux's c compiler isn't nice - it doesn't have a preprocessor
# definition for aux. So, let's invent one. Also turn on -n
# for shared code.
ifelse(os,[aux],[
define([cflags],concat(cflags,[ -n -Daux]))
define([lflags],concat(lflags,[ -n]))])
# check to see if we need sysvinstall usage
ifelse(os,[aux], [define([sysvinstall],[yes])],
os,[hpux],[define([sysvinstall],[yes])],
os,[irix],[define([sysvinstall],[yes])])
# or if we really want to use install
# ifelse(os,[someOS], [define([theinstaller],[install])])
# for cap library
# Valid are:
# NOFFS - no ffs function defined, fake it out
# LOCALTIME_GTOD - uses pd localtime, but gettimeofday always reads
# disk based time of day. Always defined for AUX for now. Probably
# needs to be changed for versions of Aux after 1.0
# NORECVMSG - no recvmsg in system (fake it out)
# NOSENDMSG - no recvmsg in system (fake it out)
define([caposdefs],
concat( ifdef([X_NOFFS],[ -DNOFFS],[]),
ifelse(os,[aux],[ -DLOCALTIME_GTOD],[]),
ifdef([X_NORECVMSG], [ -DNORECVMSG],[]),
ifdef([X_NOSENDMSG], [ -DNOSENDMSG],[])))
# for afp library
# two cases for X_LOCKF - if lockf isn't defined
# first: X_FCNTLLOCKF is defined, so just note that lockf uses fcntl.h
# second: " " isn't defined so define no lockf
define([afposdefs],
concat( ifdef([X_FLOCK],[],[ -DNOFLOCK]),
ifdef([X_LOCKF],[],
[ifdef([X_FCNTLLOCKF],[-DLOCKFUSESFCNTL],[-DNOLOCKF])])))
# for aufs
define([aufsosdefs],
concat(aufsosdefs,
ifdef([X_STATFS],[ -DUSESTATFS],[]),
ifdef([X_GETMNT],[ -DUSEGETMNT],[]),
ifdef([X_QUOTA],[ -DUSEQUOTA],[]),
ifdef([X_SUNQUOTA],[ -DUSESUNQUOTA],[]),
ifelse(os,[aix],[ -DNOVFORK -DUSECHOWN],[])))
# if no ranlib (or fakeout like hpux) and need to order libaries
ifelse(os,[dummy],[define(uselordertsort,[1])],
os,[aux], [define(uselordertsort,[1])],
os,[irix], [define(uselordertsort,[1])])
# lw config
define([lwflags],
concat(lwflags,
ifdef([fastether],[-DSFLOWQ=1],[]),
ifelse(os,[aix],[],[])))
# more papif config
define([papflags],
concat(papflags,
ifelse(os,[aix],[ -DNOVFORK],[])))
#NBPFLAGS = nbpflags()
#SPECCFLAGS = specialcflags()
#BIGCFLAGS = bigcflags()
#CFLAGS = cflags()
#LFLAGS = lflags()
#AFPOSDEFS = afposdefs()
#AUFSOSDEFS = aufsosdefs()
ifdef([debug],[
# location of include files
define([includedir],[cwd])
# location of des subroutine source (see lib/afp/README)
define([desloc],[[../../extras]])
# location of atalk.local, etc.
define([etcdest],concat(cwd,[[[/etc]]]))
# location of user cap programs
define([capdestdir],concat(cwd,[[[/bin]]]))
# location of cap "server" programs (aufs, lwsrv, papif, uab etc.)
define([capsrvrdestdir],concat(cwd,[[[/bin]]]))
# location of some cap data files
define([caplibdestdir],concat(cwd,[[[/bin]]]))
# location of cap libraries
define([libdestdir],concat(cwd,[[[/lib]]]))
# cap library names
define([caplib],[[libcap.a]])
define([afplib],[[libafp.a]])
define([afpclib],[[libafpc.a]])
# names to load cap libraries with
define([libcap],concat(cwd,[[[/lib/libcap.a]]]))
define([libafp],concat(cwd,[[[/lib/libafp.a]]]))
define([libafpc],concat(cwd,[[[/lib/libafpc.a]]]))
define([capprinters],concat([\"],etcdest,[/],[cap.printers],[\"]))
define([cflags],concat(cflags,[ -I],includedir))
define([atalklocal],concat([\"],etcdest,[/],[atalk.local],[\"]))
define([configdir],concat([\"],etcdest,[\"]))
])
define([datestring],maketemp(/tmp/capcXXXXXX))
syscmd(date > datestring())
##########MARKER##########
# Makefile autoconfigured for ...
[#] osname() system on include(datestring())
syscmd(rm datestring())
MFLAGS=mflags()
LFLAGS=lflags()
CC=thecompiler()
LD=theloader()
SHELL=/bin/sh
INSTALLER=theinstaller()