3 # This is for MachTen 4.1.4. It might work on other versions and variants
4 # too. If it doesn't, tell me, and I'll try to fix it -- domo@computer.org
6 # Users of earlier MachTen versions might need a fixed tr from ftp.tenon.com.
7 # This should be described in the MachTen release notes.
9 # MachTen 2.x has its own hint file.
11 # The original version of this file was put together by Andy Dougherty
12 # <doughera@lafcol.lafayette.edu> based on comments from lots of
14 # Mark Pease <peasem@primenet.com>
15 # Martijn Koster <m.koster@webcrawler.com>
16 # Richard Yeh <rcyeh@cco.caltech.edu>
18 # Remove dynamic loading libraries from search; enable SysV IPC with
19 # MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions
20 # -- Dominic Dunlop <domo@computer.org> 000224
21 # Disable shadow password file access: MT 4.1.1 has necessary library
22 # functions, but not header file (or documentation)
23 # -- Dominic Dunlop <domo@computer.org> 990804
24 # For now, explicitly disable dynamic loading -- MT 4.1.1 has it,
25 # but these hints do not yet support it.
26 # Define NOTEDEF_MACHTEN to undo gratuitous Tenon hack to signal.h.
27 # -- Dominic Dunlop <domo@computer.org> 9800802
28 # Completely disable SysV IPC pending more complete support from Tenon
29 # -- Dominic Dunlop <domo@computer.org> 980712
30 # Use vfork and perl's malloc by default
31 # -- Dominic Dunlop <domo@computer.org> 980630
32 # Raise perl's stack size again; cut down reg_infty; document
33 # -- Dominic Dunlop <domo@computer.org> 980619
34 # Use of semctl() can crash system: disable -- Dominic Dunlop 980506
35 # Raise stack size further; slight tweaks to accomodate MT 4.1
36 # -- Dominic Dunlop <domo@computer.org> 980211
37 # Raise perl's stack size -- Dominic Dunlop <domo@tcp.ip.lu> 970922
38 # Reinstate sigsetjmp iff version is 4.0.3 or greater; use nm
39 # (assumes Configure change); prune libswanted -- Dominic Dunlop 970113
40 # Warn about test failure due to old Berkeley db -- Dominic Dunlop 970105
41 # Do not use perl's malloc; SysV IPC OK -- Neil Cutcliffe, Tenon 961030
42 # File::Find's use of link count disabled by Dominic Dunlop 960528
43 # Perl's use of sigsetjmp etc. disabled by Dominic Dunlop 960521
45 # Comments, questions, and improvements welcome!
47 # MachTen 4.1.1's support for shadow password file access is incomplete:
48 # disable its use completely.
49 d_endspent=${d_endspent:-undef}
50 d_getspent=${d_getspent:-undef}
51 d_getspnam=${d_getspnam:-undef}
52 d_setspent=${d_setspent:-undef}
54 # MachTen 4.1.1 does support dynamic loading, but perl doesn't
55 # know how to use it yet.
58 # MachTen 4.1.1 may have an unhelpful hack in /usr/include/signal.h.
60 if grep NOTDEF_MACHTEN /usr/include/signal.h > /dev/null
62 ccflags="$ccflags -DNOTDEF_MACHTEN"
65 # Power MachTen is a real memory system and its standard malloc
66 # has been optimized for this. Using this malloc instead of Perl's
67 # malloc may result in significant memory savings. In particular,
68 # unlike most UNIX memory allocation subsystems, MachTen's free()
69 # really does return unneeded process data memory to the system.
70 # However, MachTen's malloc() is woefully slow -- maybe 100 times
71 # slower than perl's own, so perl's own is usually the better
72 # choice. In order to use perl's malloc(), the sbrk() system call
73 # must be simulated using MachTen's malloc(). See malloc.c for
74 # precise details of how this is achieved. Recent improvements
75 # to perl's malloc() currently crash MachTen, and so are disabled
76 # by -DPLAIN_MALLOC and -DNO_FANCY_MALLOC.
77 usemymalloc=${usemymalloc:-y}
79 # Older versions of MachTen malloc() data on a two-byte boundary, which
80 # works, but slows down operations on long, float and double data.
81 # Perl's malloc() can compensate if SYSTEM_ALLOC_ALIGNMENT is suitably
83 if expr "$osvers" \< "4.1" >/dev/null
85 system_alloc_alignment=" -DSYSTEM_ALLOC_ALIGNMENT=2"
87 # Do not wrap the following long line
88 malloc_cflags='ccflags="$ccflags -DPLAIN_MALLOC -DNO_FANCY_MALLOC -DUSE_PERL_SBRK$system_alloc_alignment"'
90 # When MachTen does a fork(), it immediately copies the whole of
91 # the parent process' data space for the child. This can be
92 # expensive. Using vfork() where appropriate avoids this cost.
93 d_vfork=${d_vfork:-define}
95 # Specify a high level of optimization (-O3 wouldn't do much more)
96 optimize=${optimize:--O2 -fomit-frame-pointer}
98 # Make symbol table listings les voluminous
101 # Set reg_infty -- the maximum allowable number of repeats in regular
102 # expressions such as /a{1,$max_repeats}/, and the maximum number of
103 # times /a*/ will match. Setting this too high without having a stack
104 # large enough to accommodate deep recursion in the regular expression
105 # engine allows perl to crash your Mac due to stack overrun if it
106 # encounters a pathological regular expression. The default is a
107 # compromise between capability and required stack size (see below).
108 # You may override the default value from the Configure command-line
111 # Configure -Dreg_infty=16368 ...
113 reg_infty=${reg_infty:-2047}
115 # If you want to have many perl processes active simultaneously --
116 # processing CGI forms -- for example, you should opt for a small stack.
117 # For safety, you should set reg_infty no larger than the corresponding
118 # value given in this table:
120 # Stack size reg_infty value supported
121 # ---------- -------------------------
124 # 512k 2**10-1 (1023)
127 # 16M 2**15-1 (32767) (perl's default value)
129 # This script selects a safe stack size based on the value of reg_infty
130 # specified above. However, you may choose to take a risk and set
131 # stack size lower: pathological regular expressions are rare in real-world
132 # programs. But be aware that, if perl does encounter one, it WILL
133 # crash your system. Do not set stack size lower than 96k unless
134 # you want perl's installation tests ( make test ) to crash your system.
136 # You may override the default value from the Configure command-line
137 # by specifying the required size in kilobytes like this:
139 # Configure -Dstack_size=96
141 if [ "X$stack_size" = 'X' ]
144 X=`expr $reg_infty / 256`
149 stack_size=`expr $stack_size \* 2`
151 X=`expr $stack_size \* 1024`
154 ldflags="$ldflags -Xlstack=$X"
155 ccflags="$ccflags -DREG_INFTY=$reg_infty"
157 # Install in /usr/local by default
160 # At least on PowerMac, doubles must be aligned on 8 byte boundaries.
161 # I don't know if this is true for all MachTen systems, or how to
162 # determine this automatically.
165 # 4.0.2 and earlier had a problem with perl's use of sigsetjmp and
166 # friends. Use setjmp and friends instead.
167 expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef'
169 # System V IPC before MachTen 4.1.4 is incomplete (missing msg function
170 # prototypes, no ftok()), buggy (semctl(.., .., IPC_STATUS, ..) hangs
171 # system), and undocumented. Claim it's not there at all before 4.1.4.
172 if expr "$osvers" \< "4.1.4" >/dev/null
174 d_msg=${d_msg:-undef}
175 d_sem=${d_sem:-undef}
176 d_shm=${d_shm:-undef}
179 # Get rid of some extra libs which it takes Configure a tediously
180 # long time never to find on MachTen, or which break perl
181 set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \
182 -e 's/ inet / /' -e 's/ nsl / /' -e 's/ nm / /' -e 's/ malloc / /' \
183 -e 's/ ld / /' -e 's/ sun / /' -e 's/ posix / /' \
184 -e 's/ cposix / /' -e 's/ crypt / /' -e 's/ dl / /' -e 's/ dld / /' \
185 -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'`
189 # While link counts on MachTen 4.1's fast file systems work correctly,
190 # on Macintosh Heirarchical File Systems, (and on HFS+)
191 # MachTen always reports ony two links to directories, even if they
192 # contain subdirectories. Consequently, we use this variable to stop
193 # File::Find using the link count to determine whether there are
194 # subdirectories to be searched. This will generate a harmless message:
195 # Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
196 # Propagating recommended variable dont_use_nlink
197 dont_use_nlink=define
201 During Configure, you may see the message
203 *** WHOA THERE!!! ***
204 The recommended value for \$d_msg on this machine was "undef"!
205 Keep the recommended value? [y]
207 as well as similar messages concerning \$d_sem and \$d_shm. Select the
208 default answers: MachTen 4.1 appears to provide System V IPC support,
209 but it is incomplete and buggy: perl should be built without it.
211 Similarly, when you see
213 *** WHOA THERE!!! ***
214 The recommended value for \$d_vfork on this machine was "define"!
215 Keep the recommended value? [y]
217 select the default answer: vfork() works, and avoids expensive data
220 You may also see "WHOA THERE!!!" messages concerning \$d_endspent,
221 \$d_getspent, \$d_getspnam and \$d_setspent. In all cases, select the
222 default answer: MachTen's support for shadow password file access is
223 incomplete, and should not be used.
225 At the end of Configure, you will see a harmless message
227 Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
228 Propagating recommended variable dont_use_nlink
229 Propagating recommended variable nmopts
230 Propagating recommended variable malloc_cflags...
231 Propagating recommended variable reg_infty
232 Propagating recommended variable system_alloc_alignment
233 Read the File::Find documentation for more information about dont_use_nlink
235 Your perl will be built with a stack size of ${stack_size}k and a regular
236 expression repeat count limit of $reg_infty. If you want alternative
237 values, see the file hints/machten.sh for advice on how to change them.
242 may fail since MachTen may not return a useful nlinks field to stat
246 expr "$osvers" \< "4.1" >/dev/null && test -r ./broken-db.msg && \