[PATCH 5.004_64]: hints/machten.sh: disable semctl()
[p5sagit/p5-mst-13.2.git] / hints / machten.sh
1 # machten.sh
2 # This is for MachTen 4.0.3.  It might work on other versions and variants too.
3 #
4 # Users of earlier MachTen versions might need a fixed tr from ftp.tenon.com.
5 # This should be described in the MachTen release notes.
6 #
7 # MachTen 2.x has its own hint file.
8 #
9 # This file has been put together by Andy Dougherty
10 # <doughera@lafcol.lafayette.edu> based on comments from lots of
11 # folks, especially 
12 #       Mark Pease <peasem@primenet.com>
13 #       Martijn Koster <m.koster@webcrawler.com>
14 #       Richard Yeh <rcyeh@cco.caltech.edu>
15 #
16 # Use of semctl() can crash system: disable -- Dominic Dunlop 980506
17 # Raise stack size further; slight tweaks to accomodate MT 4.1
18 #                      -- Dominic Dunlop <domo@computer.org> 980211
19 # Raise perl's stack size -- Dominic Dunlop <domo@tcp.ip.lu> 970922
20 # Reinstate sigsetjmp iff version is 4.0.3 or greater; use nm
21 # (assumes Configure change); prune libswanted -- Dominic Dunlop 970113
22 # Warn about test failure due to old Berkeley db -- Dominic Dunlop 970105
23 # Do not use perl's malloc; SysV IPC OK -- Neil Cutcliffe, Tenon 961030
24 # File::Find's use of link count disabled by Dominic Dunlop 960528
25 # Perl's use of sigsetjmp etc. disabled by Dominic Dunlop 960521
26 #
27 # Comments, questions, and improvements welcome!
28 #
29 # MachTen 4.X does support dynamic loading, but perl doesn't
30 # know how to use it yet.
31
32 # Power MachTen is a real memory system and its standard malloc
33 # has been optimized for this. Using this malloc instead of Perl's
34 # malloc may result in significant memory savings.
35 usemymalloc='false'
36
37 # Make symbol table listings les voluminous
38 nmopts=-gp
39
40 # Increase perl's stack size.  Without this, lib/complex.t crashes out.
41 # Particularly perverse programs may require that perl has an even larger
42 # stack allocation than that specified here.  (See  man setstackspace )
43 ldflags='-Xlstack=0x018000'
44
45 # Install in /usr/local by default
46 prefix='/usr/local'
47
48 # At least on PowerMac, doubles must be aligned on 8 byte boundaries.
49 # I don't know if this is true for all MachTen systems, or how to
50 # determine this automatically.
51 alignbytes=8
52
53 # 4.0.2 and earlier had a problem with perl's use of sigsetjmp and
54 # friends.  Use setjmp and friends instead.
55 expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef'
56
57 # semctl(.., ..,  IPC_STATUS, ..) hangs system: say we don't have semctl()
58 d_semctl='undef'
59
60 # Get rid of some extra libs which it takes Configure a tediously
61 # long time never to find on MachTen
62 set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \
63     -e 's/ inet / /' -e 's/ nsl / /' -e 's/ nm / /' -e 's/ malloc / /' \
64     -e 's/ ld / /' -e 's/ sun / /' -e 's/ posix / /' \
65     -e 's/ cposix / /' -e 's/ crypt / /' \
66     -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'`
67 shift
68 libswanted="$*"
69
70 # While link counts on MachTen 4.1's fast file systems work correctly,
71 # on Macintosh Heirarchical File Systems, (and on HFS+)
72 # MachTen always reports ony two links to directories, even if they
73 # contain subdirectories.  Consequently, we use this variable to stop
74 # File::Find using the link count to determine whether there are
75 # subdirectories to be searched.  This will generate a harmless message:
76 # Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
77 #       Propagating recommended variable dont_use_nlink
78 dont_use_nlink=define
79
80 cat <<'EOM' >&4
81
82 During Configure, you may see the message
83
84 *** WHOA THERE!!! ***
85     The recommended value for $d_semctl on this machine was "undef"!
86     Keep the recommended value? [y]
87
88 Select the default answer: semctl() is buggy, and perl should be built
89 without it.
90
91 At the end of Configure, you will see a harmless message
92
93 Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
94         Propagating recommended variable dont_use_nlink
95         Propagating recommended variable nmopts
96 Read the File::Find documentation for more information about dont_use_nlink
97
98 Tests
99         io/fs test 4  and
100         op/stat test 3
101 may fail since MachTen may not return a useful nlinks field to stat
102 on directories.
103
104 EOM
105 expr "$osvers" \< "4.1" >/dev/null && test -r ./broken-db.msg && \
106     . ./broken-db.msg