-
Notifications
You must be signed in to change notification settings - Fork 6
/
Configure
executable file
·1975 lines (1938 loc) · 59 KB
/
Configure
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
# $Author: djh $ $Date: 1996/09/10 14:11:08 $
# $Header: /mac/src/cap60/RCS/Configure,v 2.107 1996/09/10 14:11:08 djh Rel djh $
# $Revision: 2.107 $
# CAP configuration shell script. This ain't perfect, but it's a start.
# Execute with /bin/sh Configure if your system won't run it (ksh is okay too)
#
# Usage: Configure [output file name]
#
fastether="define([fastether],1) # For papif and samples"
needselfdef="define([selfdefinetypes],1)"
# ccompiler="define([thecompiler],[cc])"
if [ -z "${CC}" ]; then
ccompiler=cc
else
ccompiler=${CC}
fi
export ccompiler
# lpd system "bsd" or sys v "lp"
lpd="bsd"
mydir=`pwd`
PCAT=/bin/cat
PGREP=grep
if [ -f /bin/nm ]; then
PNM=/bin/nm
else
if [ -f /usr/ccs/bin/nm ]; then
PNM=/usr/ccs/bin/nm
else
PNM=/usr/bin/nm
fi
fi
# define to sh or /bin/sh if shell scripts can't be "executed" for some reason
USESH=""
export PGREP
os=""
ossecondary=""
echo
echo "This is the CAP configuration script. It will attempt to help"
echo "you get the CAP libraries and component programs configured."
echo
if [ -f /etc/atalk.local ]; then
${PGREP} _ /etc/atalk.local > /dev/null
rc=$?
if [ $rc -eq 0 ]; then
echo "WARNING: Your /etc/atalk.local file MAY need to be edited."
echo "Zone names must now be quoted to include spaces. The use"
echo "of underscores to denote a space is no longer supported."
echo
fi
fi
echo
echo "MAJOR CONFIGURATION"
useatis=1
# Configure OS
echo "Checking for Ultrix 4.0, OSF1, or later versions of Ultrix"
# Ultrix4.0
if [ -f /bin/uname ]; then
case "`/bin/uname`" in
"ULTRIX")
if [ `/bin/uname -r` -ge 4 ]; then
osdefault="ultrix40"
fi
;;
"OSF1")
osdefault="osf1"
;;
esac
fi
# Ultrix2.0
if [ -z "${osdefault}" ]; then
echo "Checking for Ultrix 2.0"
if [ -f /vmb.exe ]; then
if [ -d /var ]; then
ossecondary="ultrix22"
echo "Ultrix 2.2 or later version of Ultrix"
else
echo "Ultrix 2.0 or later version of Ultrix"
fi
osdefault="ultrix20"
fi
fi
# sunos
if [ -z "${osdefault}" ]; then
echo "Checking for SunOS/Solaris"
if [ -f /bin/uname ]; then
if [ `uname -s` = "SunOS" ]; then
if [ -f /bin/uname ]; then
if [ `uname -r` -ge "5.0" ]; then
echo "Solaris"
osdefault="solaris"
else
echo "SunOS"
osdefault="sunos"
fi
else
echo "SunOS"
osdefault="sunos"
fi
fi
fi
fi
# Encore Multimax
if [ -z "${osdefault}" ]; then
echo "Checking for Encore MultiMax"
if [ -f /Umax.image ]; then
osdefault="encore"
fi
fi
# IBM RT
if [ -z "${osdefault}" ]; then
echo "Checking for IBM RT running ACIS 4.2/4.3"
if [ -f /lib/ropt ]; then
if [ -d /usr/ibm ]; then
osdefault="bsd"
echo "IBM RT with ACIS 4.x"
ossecondary="acis 4.x"
if [ -f /bin/pcc ]; then
echo "I see /bin/pcc - I will use this instead of cc in case"
echo "you have the MetaWare High C compiler set as default"
ccompiler="pcc"
else
echo "WARNING: the MetaWare High C compiler and CAP are not compatible"
echo "modify the thecompiler define to point to the portable C compiler"
echo "if the default happens to be hc"
fi
fi
fi
fi
# Pyramid
if [ -z "${osdefault}" ]; then
echo "Checking for Pyramid"
if [ -f /bin/pyr ]; then
/bin/pyr
rc=$?
if [ $rc -eq 0 ]; then
echo "Pyramid"
osdefault="pyr"
fi
fi
fi
#Amdahl
if [ -z "${osdefault}" ]; then
echo "Checking for UTS"
if [ -f /bin/uts ]; then
/bin/uts
rc=$?
if [ $rc -eq 0 ]; then
echo "uts"
osdefault="uts"
lpd="lp"
fi
fi
fi
#ICL DRS6000 with DRS/NX 4.0
if [ -z "${osdefault}" ]; then
echo "Checking for DRS/NX"
if [ -f /bin/uname ]; then
if [ `uname -m` = "DRS6000" ]; then
if [ `uname -s` = "unix" ]; then
echo "drsnx - ensure /usr/ucb comes before /usr/bin"
osdefault="drsnx"
lpd="lp"
fi
fi
fi
fi
useauxappletalk=0
# A/UX, hpux, SCO Xenix System V
if [ -z "${osdefault}" ]; then
echo "Checking for System V based machines"
if [ -f /bin/uname ]; then
case "`uname`" in
"A/UX")
echo "A/UX"
osdefault="aux"
if [ `uname -r` -ge 2 ]; then
echo "Release 2.0 or greater"
echo "(defaulting to native AppleTalk)"
useauxappletalk=1
useatis=0
lpd="lpr"
else
echo "Release 1.1.1 or less"
lpd="lp"
fi
break
;;
"HP-UX")
echo "HP-UX"
osdefault="hpux"
lpd="lp"
break
;;
"XENIX")
echo "SCO Xenix System V"
osdefault="xenix5"
lpd="lp"
break
;;
"AIX")
echo "IBM AIX System V"
osdefault="aix"
lpd="lp"
break
;;
"DomainOS")
osdefault="domainossysv"
echo "HP/Apollo Domain OS System V"
echo "Sorry, I do not build under Sys 5.3 environment."
echo "Try building under BSD 4.3 environment."
exit
break
;;
esac
fi
fi
# Sequent Balance
if [ -z "${osdefault}" ]; then
echo "Checking for Sequent Balance"
if [ -f /dynix ]; then
echo "Sequent Balance"
osdefault="dynix"
fi
fi
# Silicon Graphics
if [ -z "${osdefault}" ]; then
echo "Checking for Silicon Graphics IRIS/IRIX"
if [ -f /bin/4d ]; then
/bin/4d
rc=$?
if [ $rc -eq 0 ]; then
echo "Silicon Graphics IRIS/IRIX"
osdefault="irix"
fi
fi
fi
# Sony NEWS
if [ -z "${osdefault}" ]; then
echo "Checking for Sony NEWS"
if [ -d /usr/sony/bin ]; then
echo "Sony NEWS"
osdefault="newsos"
fi
fi
# Control Data EP/IX V1/V2
if [ -z "${osdefault}" ]; then
echo "Checking for Control Data EP/IX V1/V2"
if [ -f /bin/uname ]; then
if [ "`/bin/uname -v`" = "UMIPS" \
-o "`/bin/uname -v`" = "RISCos" ]; then
echo "Control Data EP/IX"
osdefault="epix"
echo "Compile using bsd43 environment"
ccompiler="cc -systype bsd43"
fi
fi
fi
# 386bsd, FreeBSD 1.n and derivatives
if [ -z "${osdefault}" ]; then
echo "Checking for 386bsd etc."
if [ -x /386bsd ]; then
echo "386BSD and derivatives"
osdefault="386bsd"
fi
fi
# NetBSD 1.0
if [ -z "${osdefault}" ]; then
echo "Checking for NetBSD 1.0"
if [ -x /netbsd ]; then
echo "NetBSD 1.0"
osdefault="netbsd"
fi
fi
# FreeBSD 2.0
if [ -z "${osdefault}" ]; then
echo "Checking for FreeBSD"
if [ -f /usr/bin/uname ]; then
if [ "`/usr/bin/uname -s`" = "FreeBSD" ]; then
echo "FreeBSD"
osdefault="freebsd"
fi
fi
fi
# BSDI 1.1
if [ -z "${osdefault}" ]; then
echo "Checking for BSDI BSD/386 1.1"
if [ -f /bsd ]; then
echo "BSDI BSD/386 1.1"
osdefault="bsdi"
fi
fi
# Linux 1.3.N
if [ -z "${osdefault}" ]; then
echo "Checking for Linux"
if [ -f /vmlinuz ]; then
echo "Linux"
osdefault="linux"
fi
fi
# HP/Apollo Domain
if [ -z "${osdefault}" ]; then
echo "Checking for HP/Apollo Domain 10.4"
if [ -f /lib/clib -a -f /lib/libc ]; then
if [ "${SYSTYPE}" = "bsd4.3" ]; then
domainvers=none
domainvers=`/usr/apollo/bin/bldt | { read ln; read ln; read d1 d2 d3 ver ln; echo $ver; }`
case "$domainvers" in
10.0, | 10.0.1, ) domainvers=10.0;;
10.1, ) domainvers=10.1;;
10.2, | 10.2.[0-9]*, ) domainvers=10.2;;
10.3, | 10.3.[0-9]*, ) domainvers=10.3;;
10.4, | 10.4.[0-9]*, ) domainvers=10.4;;
esac
echo "HP/Apollo Domain Version ${domainvers} under BSD 4.3 env."
osdefault="domainosbsd"
echo "Read NOTES about //node/path syntax in afpvols"
if [ "${domainvers}" != "10.4" ]; then
echo "WARNING: untested under Domain OS other than 10.4"
fi
fi
fi
fi
# NeXTstation
if [ -z "${osdefault}" ]; then
echo "Checking for NeXT."
if [ -x /NextApps ]; then
echo "NeXT"
osdefault="next"
fi
fi
# Default
if [ -z "${osdefault}" ]; then
echo "Establishing default as BSD"
echo "Warning: unable to guess unix variant, setting to bsd standard."
echo "bsd should be good for the following:"
echo " IBM-RT (ACIS 4.2,4.3), Ultrix 1.0, Ultrix 1.1, BSD 4.2,"
echo " and BSD 4.3"
osdefault="bsd"
fi
echo
valid=0
echo -n test | ${PGREP} n > /dev/null
rc=$?
if [ $rc -ne 0 ]; then
PROMPT="echo -n"
elif [ -x /usr/ucb/echo ]; then
PROMPT="/usr/ucb/echo -n"
else
PROMPT="echo"
fi
while [ ${valid} -eq 0 ];
do
${PROMPT} "Operating System type? (default ${osdefault}, ? for valid items) "
read os arg1
if [ -z "${os}" ]; then
os=${osdefault}
fi
case ${os} in
"osf1") valid=1;;
"ultrix20") valid=1;;
"ultrix40") valid=1;;
"ultrix12") valid=1;;
"bsd") valid=1;;
"hpux") valid=1;;
"aux") valid=1;;
"xenix5") valid=1;;
"aix") valid=1;;
"uts") valid=1;;
"pyr") valid=1;;
"sunos") valid=1;;
"solaris") valid=1;;
"encore") valid=1;;
"next") valid=1;;
"dynix") valid=1;;
"irix") valid=1;;
"newsos") valid=1;;
"drsnx") valid=1;;
"epix") valid=1;;
"386bsd") valid=1;;
"netbsd") valid=1;;
"freebsd") valid=1;;
"bsdi") valid=1;;
"linux") valid=1;;
"domainosbsd") valid=1;;
"?"|*)
if [ "${os}" != "?" ]; then
echo "unknown type ${os}, valid are:"
fi
echo " bsd - try if you aren't sure";
echo " ultrix12 - Ultrix 1.2";
echo " ultrix20 - Ultrix 2.0 or later";
echo " ultrix40 - Ultrix 4.0 or later";
echo " osf1 - DEC-OSF/1 1.3 or later";
echo " hpux - HP-UX for series 9000";
echo " aux - A/UX";
echo " uts - Amdahl UTS";
echo " xenix5 - SCO Xenix System V";
echo " aix - IBM AIX System V";
echo " pyr - pyramid";
echo " sunos - suns under SunOS 4.N or less";
echo " solaris - suns under Solaris 2.0 or greater";
echo " encore - Encore MultiMax";
echo " next - NeXT/MACH";
echo " dynix - Sequent Balance"
echo " irix - Silicon Graphics IRIS/IRIX"
echo " newsos - Sony NEWS"
echo " drsnx - ICL DRS/NX V4.0"
echo " epix - Control Data EP/IX"
echo " 386bsd - 386/BSD, FreeBSD 1.n and derivatives"
echo " netbsd - NetBSD 1.0"
echo " freebsd - FreeBSD 2.0"
echo " bsdi - BSDI BSD/386 1.1"
echo " linux - Linux"
echo " domainosbsd - HP/Apollo Domain BSD 4.3"
;;
esac
done
echo "Will configure for ${os}"
echo
echo
uabprogs="define([uabprogs],[])"
uabplibs="define([uabplibs],[])"
uabpobjs="define([uabpobjs],[])"
etherprogs="define([etherprogs],[])"
etherpobjs="define([etherpobjs],[])"
capdprogs="define([capdprogs],[])"
capdpobjs="define([capdpobjs],[])"
lapobj="define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])"
usingphase2="# define([usephase2],1)"
usingatis="# define([useatis],1)"
singletree="# define([debug],1)"
includefile="# define([includef],1)"
result=0
usephase2=0
uabsupport=0
uarsupport=0
ethersupport=0
kernelsupport=0
case ${os} in
"sunos"|"ultrix40"|"ultrix20"|"ultrix12"|"osf1")
uabsupport=1
uarsupport=1
ethersupport=1
;;
"solaris")
uarsupport=1
ethersupport=1
;;
"aix")
uarsupport=1
;;
"pyr")
# later, someone should try this.
# uabsupport=1
ethersupport=1
;;
"irix")
uabsupport=1
uarsupport=1
ethersupport=0
;;
"newsos")
uabsupport=1
uarsupport=1
ethersupport=0
;;
"hpux")
uabsupport=1
uarsupport=1
ethersupport=0
;;
"386bsd")
uabsupport=1
uarsupport=1
ethersupport=1
;;
"netbsd")
uabsupport=1
uarsupport=1
ethersupport=1
;;
"freebsd")
uabsupport=1
uarsupport=1
ethersupport=1
;;
"bsdi")
uabsupport=1
uarsupport=1
ethersupport=1
;;
"linux")
uarsupport=1
kernelsupport=1
;;
"next")
uarsupport=1
ethersupport=1
;;
*)
uabsupport=0
uarsupport=0
ethersupport=0
;;
esac
# Tell people their list of choices...
if [ ${uabsupport} -eq 1 -o ${uarsupport} -eq 1 \
-o ${ethersupport} -eq 1 -o ${kernelsupport} -eq 1 ]; then
echo "In addition to IPTalk (the default), this operating system"
echo "can also support CAP AppleTalk packets over EtherTalk via:"
echo
if [ ${uabsupport} -eq 1 ]; then
echo " UAB (Unix AppleTalk Bridge)"
fi
if [ ${uarsupport} -eq 1 ]; then
echo " UAR (Unix AppleTalk Router)"
fi
if [ ${ethersupport} -eq 1 ]; then
echo " Native EtherTalk"
fi
if [ ${kernelsupport} -eq 1 ]; then
echo " Kernel AppleTalk"
fi
echo
echo "See the README files and other documentation for further info."
echo
fi
if [ ${uabsupport} -eq 1 ]; then
result=0
while :
do
${PROMPT} "Do you wish to use UAB (Unix AppleTalk Bridge) (default no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -eq 0 ]; then
echo "Not using UAB."
uabprogs="define([uabprogs],[])"
uabplibs="define([uabplibs],[])"
uabpobjs="define([uabpobjs],[])"
lapobj="define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])"
else
uabprogs="define([uabprogs],[uab])"
uabplibs="define([uabplibs],[libuabcap.a])"
lapobj="define([lapobj],[abmkip.o abddp.o abnbp.o atalkdbm.o])"
case ${os} in
"ultrix20"|"ultrix12")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[dlip.o])";;
"ultrix40")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[spfiltp.o])";;
"osf1")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[spfiltp.o])";;
"pyr")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[senetp.o])";;
"irix")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[snooppf.o])";;
"newsos")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[srawetherp.o])";;
"hpux")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[sllap.o])";;
"386bsd"|"netbsd"|"freebsd"|"bsdi"|"next")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[bpfiltp.o])";;
"solaris")
echo "OK, setting things up for UAB."
uabpobjs="define([uabpobjs],[sdlpi.o])";;
"sunos")
${PROMPT} "Have you installed the 'enet' driver (no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") aresult=1;;
*) aresult=0;;
esac
if [ $aresult -eq 0 ]; then
echo "OK, using the NIT ethernet interface."
uabpobjs="define([uabpobjs],[snitp.o])"
else
echo "OK, using the 'enet' ethernet interface."
uabpobjs="define([uabpobjs],[senetp.o])"
fi
esac
fi
fi
echo
if [ $result -eq 0 ]; then
if [ ${uarsupport} -eq 1 ]; then
result=0
while :
do
${PROMPT} "Do you wish to use UAR (Unix AppleTalk Router)(default no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -eq 0 ]; then
echo "Not using UAR."
uabprogs="define([uabprogs],[])"
uabplibs="define([uabplibs],[])"
uabpobjs="define([uabpobjs],[])"
lapobj="define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])"
else
uabprogs="define([uabprogs],[])"
uabplibs="define([uabplibs],[])"
uabpobjs="define([uabpobjs],[])"
lapobj="define([lapobj],[abmkip.o abddp.o abnbp.o atalkdbm.o])"
${PROMPT} "Do you want Phase 2 compatibility (yes) ? "
read ans
if [ -z "${ans}" ]; then
ans="yes"
fi
case ${ans} in
"yes"|"y")
usephase2=1
echo "OK, setting things up for UAR, Phase 2."
;;
*)
echo "OK, setting things up for UAR, Phase 1."
;;
esac
fi
fi
fi
echo
if [ $result -eq 0 ]; then
if [ ${ethersupport} -eq 1 ]; then
result=0
while :
do
${PROMPT} "Do you wish to use Native EtherTalk (default no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -eq 0 ]; then
echo "Not using Native EtherTalk."
etherprogs="define([etherprogs],[])"
etherpobjs="define([etherpobjs],[])"
lapobj="define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])"
else
etherprogs="define([etherprogs],[aarpd])"
lapobj="define([lapobj],[abetalk.o abddp.o abnbp.o atalkdbm.o])"
case ${os} in
"ultrix20"|"ultrix12")
echo "OK, setting things up for Native EtherTalk."
etherpobjs="define([etherpobjs],[dlip.o])";;
"osf1"|"ultrix40")
${PROMPT} "Do you want Phase 2 compatibility (yes) ? "
read ans
if [ -z "${ans}" ]; then
ans="yes"
fi
case ${ans} in
"yes"|"y")
usephase2=1
echo "OK, setting things up for Native EtherTalk, Phase 2"
;;
*)
echo "OK, setting things up for Native EtherTalk."
;;
esac
case ${os} in
"osf1")
etherpobjs="define([etherpobjs],[spfiltp.o])"
;;
"ultrix40")
etherpobjs="define([etherpobjs],[spfiltp.o])"
;;
esac
;;
"pyr")
echo "OK, setting things up for Native EtherTalk."
etherpobjs="define([etherpobjs],[senetp.o])";;
"386bsd")
echo "OK, setting things up for Native EtherTalk."
etherpobjs="define([etherpobjs],[bpfiltp.o])";;
"netbsd"|"freebsd"|"bsdi"|"next")
${PROMPT} "Do you want Phase 2 compatibility (yes) ? "
read ans
if [ -z "${ans}" ]; then
ans="yes"
fi
case ${ans} in
"yes"|"y")
usephase2=1
echo "OK, setting things up for Native EtherTalk, Phase2."
;;
*)
echo "OK, setting things up for Native EtherTalk."
;;
esac
etherpobjs="define([etherpobjs],[bpfiltp.o])";;
"solaris")
${PROMPT} "Do you want Phase 2 compatibility (yes) ? "
read ans
if [ -z "${ans}" ]; then
ans="yes"
fi
case ${ans} in
"yes"|"y")
usephase2=1
;;
*)
;;
esac
${PROMPT} "OK, using the Streams ethernet interface "
if [ $usephase2 -eq 1 ]; then
echo "for Phase 2 support."
else
echo "for Phase 1 support."
fi
etherpobjs="define([etherpobjs],[sdlpi.o])";;
"sunos")
${PROMPT} "Do you want Phase 2 compatibility (yes) ? "
read ans
if [ -z "${ans}" ]; then
ans="yes"
fi
case ${ans} in
"yes"|"y")
usephase2=1
;;
*)
;;
esac
${PROMPT} "Have you installed the 'enet' driver (no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") aresult=1;;
*) aresult=0;;
esac
if [ $aresult -eq 0 ]; then
${PROMPT} "OK, using the NIT ethernet interface"
etherpobjs="define([etherpobjs],[snitp.o])"
else
${PROMPT} "OK, using the 'enet' ethernet interface"
etherpobjs="define([etherpobjs],[senetp.o])"
fi
if [ $usephase2 -eq 1 ]; then
echo " with Phase 2."
else
echo "."
fi
;;
esac
fi
fi
fi
echo
if [ $result -eq 0 ]; then
if [ ${kernelsupport} -eq 1 ]; then
result=0
while :
do
${PROMPT} "Do you wish to use Kernel AppleTalk (default no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -eq 0 ]; then
echo "Not using Kernel AppleTalk."
capdprogs="define([capdprogs],[])"
capdpobjs="define([capdpobjs],[])"
lapobj="define([lapobj],[abkip.o abddp.o abnbp.o atalkdbm.o])"
else
echo "OK, setting things up for Kernel AppleTalk."
capdprogs="define([capdprogs],[capd])"
capdpobjs="define([capdpobjs],[capd.kas.o])"
lapobj="define([lapobj],[abkas.o abddp.o abnbp.o atalkdbm.o])"
usephase2=1
fi
fi
fi
if [ $useauxappletalk -ne 0 ]; then
lapobj="define([lapobj],[abauxddp.o abauxnbp.o])"
fi
if [ $usephase2 -ne 0 ]; then
usingphase2="define([usephase2],1)"
fi
if [ $useatis -ne 0 ]; then
usingatis="define([useatis],1)"
fi
echo
echo "CAP can be setup to occupy a single directory tree (for testing)."
result=0
while :
do
${PROMPT} "Do you wish to restrict CAP to this subdirectory (default no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -ne 0 ]; then
${PROMPT} "Which directory (" `pwd` ") ? "
read ans
if [ ! -z "${ans}" ]; then
if [ -d "${ans}" ]; then
mydir=${ans}
else
echo "Warning: the directory" ${ans} "doesn't exist."
fi
fi
echo "OK, using" ${mydir} "as the CAP root directory."
singletree="define([debug],1)"
else
echo
result=0
while :
do
${PROMPT} "Look for my include files in other than /usr/include (no) ? "
read ans
if [ -z "${ans}" ]; then
ans="no"
fi
case ${ans} in
"yes"|"y") result=1; break;;
"no" |"n") result=0; break;;
*) echo "you must answer yes or no or carriage return for no." ;;
esac
done
if [ $result -ne 0 ]; then
${PROMPT} "Include file location (" ${mydir} ") ? "
read ans
if [ -n "${ans}" ]; then
mydir="${ans}"
fi
echo "OK, using include files in" ${mydir}
includefile="define([includef],1)"
fi
fi
echo
echo "CAP can be configured for various optional features."
echo "For more information, refer to the file 'CAP60.README'."
echo
echo "Checking for special feature customisation ..."
${PCAT} <<\EOT0 > /tmp/m4.f.$$
# m4.features
#
# This file is used to determine the default set of additional features
# that will be incorporated into CAP. These features have been contributed
# by many people throughout the network community.
#
# Necessary preamble - please don't alter
define(`concat',$1$2$3$4$5$6$7$8$9)
define(`specialcflags',`')
define(`aufsosflags',`')
define(`simpleflags',`')
define(`lwflags',`')
#
# To change the feature set, simply uncomment the wanted defines().
# The Configure file will then use the customised version.
# For more details, refer to the file 'CAP60.README'
#
# + SHORT_NAMES adds short name support to AUFS for AppleShare PC.
# define(`specialcflags',concat(specialcflags,` -DSHORT_NAMES'))
#
# + NOCASEMATCH removes UNIX case sensitivity in AUFS (like Macs).
# define(`specialcflags',concat(specialcflags,` -DNOCASEMATCH'))
#
# + SIZESERVER adds a daemon per AUFS server process for volume size info.
# define(`specialcflags',concat(specialcflags,` -DSIZESERVER'))
#
# + LWSRV_AUFS_SECURITY provides printer security based on AUFS connection.
# define(`specialcflags',concat(specialcflags,` -DLWSRV_AUFS_SECURITY'))
#
# + HIDE_LWSEC_FILE increases security of LWSRV_AUFS_SECURITY flag file
# define(`aufsosflags',concat(aufsosflags,` -DHIDE_LWSEC_FILE'))
# define(`lwflags',concat(lwflags,` -DHIDE_LWSEC_FILE'))
#
# + LWSRV_LPR_LOG causes stdout/stderr lpr output to be included in lwsrv log
# define(`specialcflags',concat(specialcflags,` -DLWSRV_LPR_LOG'))
#
# + AUTHENTICATE turn on alternate AUFS/LWSRV authentication method
# define(`specialcflags',concat(specialcflags,` -DAUTHENTICATE'))
#
# + STAT_CACHE causes critical AUFS stat() calls to be cached.
# define(`specialcflags',concat(specialcflags,` -DSTAT_CACHE'))
#
# + TREL_TIMEOUT causes an extra TREL timeout listener to run to avoid timeouts
# define(`specialcflags',concat(specialcflags,` -DTREL_TIMEOUT'))
#
# + RUTGERS includes local modifications for Rutgers University
# define(`specialcflags',concat(specialcflags,` -DRUTGERS'))
#
# + MELBOURNE includes local modifications for Melbourne University
# define(`specialcflags',concat(specialcflags,` -DMELBOURNE'))
#
# + USE_HOST_ICON provides automatic aufs ICON selection on supported hosts
# define(`specialcflags',concat(specialcflags,` -DUSE_HOST_ICON'))
#
# + PERMISSIVE_USER_NAME allows AUFS users to have their real name in Chooser
# define(`specialcflags',concat(specialcflags,` -DPERMISSIVE_USER_NAME'))
#
# + ULTRIX_SECURITY adds ULTRIX enhanced security to aufs
# define(`specialcflags',concat(specialcflags,` -DULTRIX_SECURITY'))
#
# + DIGITAL_UNIX_SECURITY adds OSF/1 enhanced security to aufs
# define(`specialcflags',concat(specialcflags,` -DDIGITAL_UNIX_SECURITY'))
#
# + USING_FDDI_NET adds support for FDDI networks (Digital UNIX/Ultrix only)
# define(`specialcflags',concat(specialcflags,` -DUSING_FDDI_NET'))
#
# + USE_MAC_DATES maintains Mac Create/Modify dates on file copy
# define(`specialcflags',concat(specialcflags,` -DUSE_MAC_DATES'))
#
# + DEV_NIT specifies alternate NIT device name (default "/dev/nit")
# define(`specialcflags',concat(specialcflags,` -DDEV_NIT=\"/dev/nit\"'))
#
# + APPLICATION_MANAGER control the use of designated applications
# define(`specialcflags',concat(specialcflags,` -DAPPLICATION_MANAGER'))
#
# + AUFS_README links readme file into new user's top level
# define(`specialcflags',concat(specialcflags,` -DAUFS_README'))
#
# + ULT42PFBUG unpatched ULTRIX 4.2 packet filter workaround (also need COPYALL)
# define(`specialcflags',concat(specialcflags,` -DULT42PFBUG'))
#
# + AUFS_IDLE_TIMEOUT will disconnect idle AUFS sessions (-[i|I] period)
# define(`specialcflags',concat(specialcflags,` -DAUFS_IDLE_TIMEOUT'))
#
# + REREAD_AFPVOLS kill -USR1 will make parent aufs re-read system vols file
# define(`specialcflags',concat(specialcflags,` -DREREAD_AFPVOLS'))
#
# + PASS_THRU pass through LWSRV jobs with no adobe preprocessing (for PCs)
# define(`specialcflags',concat(specialcflags,` -DPASS_THRU'))
#
# + DONT_PARSE pass through LWSRV jobs with no adobe preprocessing at all
# define(`specialcflags',concat(specialcflags,` -DDONT_PARSE'))
#
# + XDEV_RENAME allow files to be moved over cross device links
# define(`specialcflags',concat(specialcflags,` -DXDEV_RENAME'))
#
# + USR_FILE_TYPES user defined file suffix to creator/type/xlate mapping
# define(`specialcflags',concat(specialcflags,` -DUSR_FILE_TYPES'))
#
# + CREATE_AFPVOL create user .afpvols and 'mac' directories if non-existent
# define(`specialcflags',concat(specialcflags,` -DCREATE_AFPVOL=\"mac\"'))
#
# + CREAT_AFPVOL_NAM customize name for the volume (modifies CREATE_AFPVOL)
# (CREAT_AFPVOL_NAM fmt string: %U user, %H host, %V vol, %D home eg: "%U@%H")
# define(`specialcflags',concat(specialcflags,` -DCREAT_AFPVOL_NAM="\"%U\""'))
#
# + ISO_TRANSLATE use Macintosh/ISO 8859 character translation on I/O
# define(`specialcflags',concat(specialcflags,` -DISO_TRANSLATE'))
#
# + ISO_FILENAMES extend ISO translation to filenames (assumes ISO_TRANSLATE)
# define(`specialcflags',concat(specialcflags,` -DISO_FILENAMES'))
#
# + ISO_FILE_TRANS use ISO translation on unix/TEXT file contents
# define(`specialcflags',concat(specialcflags,` -DISO_FILE_TRANS'))
#
# + DENYREADWRITE implement AUFS read/write access and deny modes