This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add probe for __attribute__(always_inline)
[metaconfig.git] / dist / U / shm_for.U
1 ?RCS: $Id: shm_for.U 1 2006-08-24 12:32:52Z rmanfredi $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
10 ?RCS:
11 ?RCS: $Log: shm_for.U,v $
12 ?RCS: Revision 3.0.1.1  1994/10/29  16:28:37  ram
13 ?RCS: patch36: call ./Cppsym explicitly instead of relying on PATH
14 ?RCS:
15 ?RCS: Revision 3.0  1993/08/18  12:09:46  ram
16 ?RCS: Baseline for dist 3.0 netwide release.
17 ?RCS:
18 ?MAKE:shm_for shm_att shm_lim: Cppsym Myread ipc uname
19 ?MAKE:  -pick add $@ %<
20 ?S:shm_for:
21 ?S:     This variable tells us the type of machine we're expecting the
22 ?S:     shared memory code to run on.  The value is available to C programs
23 ?S:     in the C_SHM_FOR manifest.
24 ?S:.
25 ?S:shm_att:
26 ?S:     This variable tells us where a shared memory segment should be
27 ?S:     attached.  Good values are HIGH, LOW, and ZERO.
28 ?S:.
29 ?S:shm_lim:
30 ?S:     This variable tells us if shared memory attached HIGH should
31 ?S:     have an upper limit.
32 ?S:.
33 ?X:     ----------------------------------------------------------
34 ?X: It's a potential lose to define anything beginning with SHM...
35 ?X: At least we can think that S_ stands for "String version of ..." -- HMS
36 ?X:     ----------------------------------------------------------
37 ?C:S_SHM_FOR ~ %<:
38 ?C:     This symbol identifies what we chose for the target system's
39 ?C:     default shared memory configuration parameters.
40 ?C:.
41 ?C:S_SHM_ATT ~ %<:
42 ?C:     This symbol holds the default "place" to attach shared memory.
43 ?C:     Values are "HIGH", "ZERO", and "LOW".
44 ?C:.
45 ?C:S_SHM_LIM ~ %<:
46 ?C:     This symbol holds the default upper bound address limit if shared
47 ?C:     memory is attached HIGH.  If zero, there is no upper limit.
48 ?C:.
49 ?H:?%<:#ifdef SERVE_SHM
50 ?H:?%<:#define S_SHM_FOR "$shm_for"
51 ?H:?%<:#define S_SHM_ATT "$shm_att"
52 ?H:?%<:#define S_SHM_LIM "$shm_lim"
53 ?H:?%<:#endif
54 ?H:.
55 ?W:%<:S_SHM_FOR S_SHM_ATT S_SHM_LIM
56 : see how to attach shared memory
57 echo " "
58 echo "Deciding how to attach shared memory..." >&4
59
60 case "$ipc" in
61 shm)
62         shm_for='Default case'
63         shm_att='HIGH'
64         shm_lim='0x0'
65         if ./Cppsym tower32 tower32_600; then
66                 echo "NCR Towers are usually normal..."
67                 : echo "Oh, an NCR Tower."
68                 : This works for the 600
69                 shm_for='NCR Tower 32'
70                 shm_att='LOW'
71         else
72                 case "$uname" in
73                 */uname)
74                         case "`uname -m`" in
75                         ACS??68*)
76                                 echo "Oh, an Altos 3068."
77                                 shm_for='Altos 3068:'
78                                 shm_lim='0x800000'
79                                 ;;
80                                 esac
81                                 ;;
82                 *)
83                         echo "Looks normal to me..."
84                         ;;
85                 esac
86         fi
87
88         dflt="$shm_for"
89         rp='Description of shared memory configuration?'
90         . ./myread
91         shm_for="$ans"
92
93         dflt="$shm_att"
94         rp='Where should shared memory be attached?'
95         . ./myread
96         shm_att="$ans"
97
98         case "$shm_att" in
99         HIGH)
100                 dflt="$shm_lim"
101                 rp='What is the upper address limit for shared memory?'
102                 . ./myread
103                 shm_lim="$ans"
104                 ;;
105         *)
106                 shm_lim=''
107                 ;;
108         esac
109         ;;
110
111 *)
112         echo "but you aren't using shared memory so I won't bother." >&4
113         shm_for='NOT CONFIGURED'
114         shm_att='NONE'
115         shm_lim='-1'
116         ;;
117 esac
118