4 FDIR=`expr $0 : '\(.*\)/first'`
10 if echo 'a\c' | grep 'c' >/dev/null ; then
11 : We have BSD-like echo command.
15 : We have SystemV-like echo command.
21 echo check write-ability of /tmp and /usr/tmp ...
22 if ( >/usr/tmp/aaax.$$ )
26 echo /usr/tmp must exist and be writable.
33 echo /tmp must exist and be writable.
36 echo "/tmp and /usr/tmp ok"
43 : "Now get system name and directories"
46 : "Take action according to the system used"
51 vax_bsd4_1a) ACM=vax4 ; SYS=BSD4_1 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
52 vax_bsd4_2) ACM=vax4 ; SYS=BSD4_2 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
53 vax_sysV_2) ACM=vax4 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=vax4 ;;
54 i386) ACM=i386 ; SYS=SYS_5 ; BYTE_ORDER=0123 ; MACH=i386 ;;
55 sun3) ACM=sun3 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68020 ;;
56 sun2) ACM=sun2 ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=m68k4 ;;
57 m68_unisoft|m68k2) ACM=m68k2 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
58 m68_sysV_0|mantra) ACM=mantra ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68k4 ;;
59 m68020) ACM=m68020 ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=m68020 ;;
60 sparc) ACM=sparc ; SYS=BSD4_2; BYTE_ORDER=3210 ; MACH=sparc ;;
61 sparc_solaris) ACM=sparc_solaris ; SYS=SYS_5; BYTE_ORDER=3210 ; MACH=sparc_solaris ;;
62 i86) ACM=i86 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;;
63 xenix3) ACM=xenix3 ; SYS=SYS_5; BYTE_ORDER=0123 ; MACH=i86 ;;
64 minix) ACM=minix ; SYS=V7; BYTE_ORDER=0123 ; MACH=i86 ;;
65 pmds) ACM=pmds ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
66 pmds4) ACM=pmds4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;;
67 minixST) ACM=minixST ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k2 ;;
68 m68k4) ACM=m68k4 ; SYS=V7; BYTE_ORDER=3210 ; MACH=m68k4 ;;
69 *) ACM=XXX ; SYS=XXX ; BYTE_ORDER=XXX ; MACH=XXX ;;
72 : do not change the order in MACH_LIST. check limit_enquire first.
73 MACH_LIST="i86 xenix3 minix i386 6500 6800 6805 6809 i80 em22 em24 em44 m68k2 pmds minixST m68k4 pmds4 sun2 mantra m68020 sun3 sparc sparc_solaris ns pdp s2650 vax4 z80 z8000 arm"
86 echo "This installation script has no knowledge about $SYSNAME.
87 You will have to specify the default machine that you want ACK to
88 compile for. Choices:"
104 echo $E_FLAG "Your choice: [$OLDACM] $E_SFX"
114 V7|BSD4_1|BSD4_2|SYS_5)
119 echo 'What kind of Unix is the target system running?
121 V7 for Unix V7, BSD 2.*
122 BSD4_1 for Berkeley 4.1
123 BSD4_2 for Berkeley 4.2, 4.3, SunOs 3, SunOs 4
124 SYS_5 for Xenix, System III, System V, SunOs 5'
125 echo $E_FLAG "Your choice (V7|BSD4_1|BSD4_2|SYS_5): [$OLDSYS] $E_SFX"
135 sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < $FDIR/local.h.src >local.h
138 *) echo '/* Optional definition of BYTE_ORDER: */' >> local.h
139 echo "#define BYTE_ORDER 0x$BYTE_ORDER" >> local.h
143 echo "Your default machine to compile for is $ACM"
145 echo "Installation of the complete ACK takes a long time. Limiting the
146 number of languages, runtime libraries, back-ends, and assemblers to be
147 installed may save a lot of time. If you want to install everything,
148 answer no to the next question. Otherwise, answer yes, and you will be
149 prompted for details"
152 echo $E_FLAG "Do you want to limit the installation in any way? (y/n) [$LIMIT] $E_SFX"
160 . $FDIR/limit_enquire
163 Xn*) . $FDIR/get_sysvax
169 if [ $TARGET_HOME = $UTIL_HOME ]
172 sun3|m68020|i386|vax*)
179 *) echo "I do not understand your answer ($ANS). Try again."
186 echo "TARGET_HOME=\"$TARGET_HOME\"; export TARGET_HOME" > macros
187 echo "UTIL_HOME=\"$UTIL_HOME\"; export UTIL_HOME" >> macros
188 echo "SRC_HOME=\"$SRC_HOME\"; export SRC_HOME" >> macros
189 echo "SYSNAME=\"$SYSNAME\"; export SYSNAME" >> macros
190 echo "ACM=\"$ACM\"; export ACM" >> macros
191 echo "CURRENT=\"$CURRENT\"; export CURRENT" >> macros
192 echo "SYS=\"$SYS\"; export SYS" >> macros
193 echo "LIMIT=\"$LIMIT\"; export LIMIT" >> macros
194 echo "CONFIG=\"$CONFIG\"; export CONFIG" >> macros
195 echo "DISABLE_LANG=\"$DISABLE_LANG\"; export DISABLE_LANG" >> macros
196 echo "DISABLE_SUP=\"$DISABLE_SUP\"; export DISABLE_SUP" >> macros
197 echo "DO_MACHINE_INDEP=\"$DO_MACHINE_INDEP\"; export DO_MACHINE_INDEP" >> macros
198 echo "MACH_LIST=\"$MACH_LIST\"; export MACH_LIST" >> macros
199 echo "SYSVAX=\"$SYSVAX\"; export SYSVAX" >> macros
200 echo "MACH=\"$MACH\"; export MACH" >> macros
201 echo "WS=\"$WS\"; export WS" >> macros
202 echo "PS=\"$PS\"; export PS" >> macros
203 echo "DO_FAST=\"$DO_FAST\"; export DO_FAST" >> macros
205 cat macros $FDIR/install_tail > INSTALL
209 A shell-script called 'INSTALL' has been created. Running it
210 installs ACK. Note that this may take a (very) long time, so run it
211 in the background, with its output redirected, f.i.:
212 sh INSTALL > INSTALL.out 2>&1 &