1 ?RCS: $Id: d_SHM_MAC.U,v 3.0 1993/08/18 12:05:41 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
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 3.0.
11 ?RCS: $Log: d_SHM_MAC.U,v $
12 ?RCS: Revision 3.0 1993/08/18 12:05:41 ram
13 ?RCS: Baseline for dist 3.0 netwide release.
15 ?MAKE:d_SHM_MAC d_SHM_PRM d_SHM_SEG d_SHM_IMMU: cat d_shm test rm +cc +ccflags
16 ?MAKE: -pick add $@ %<
18 ?S: Sometimes, the SHMLBA manifest needs sys/sysmacros.h, usually for
22 ?S: Sometimes, the SHMLBA manifest needs sys/param.h, usually for the
26 ?S: Sometimes, the SHMLBA manifest needs sys/seg.h, usually for the
27 ?S: SNUMSHFT constant.
30 ?S: Sometimes, the SHMLBA manifest needs sys/immu.h, usually for the
33 ?C:SHMLBA_WANTS_SYSMACROS:
34 ?C: This value tells us to include <sys/sysmacros.h> because SHMLBA
35 ?C: needs something from there, probably the ctob() macro.
37 ?C:SHMLBA_WANTS_PARAM:
38 ?C: This value tells us to include <sys/param.h> because SHMLBA needs
39 ?C: something from there, probably the NBPC constant.
42 ?C: This value tells us to include <sys/seg.h> because SHMLBA needs
43 ?C: something from there, probably the SNUMSHFT constant.
46 ?C: This value tells us to include <sys/immu.h> because SHMLBA needs
47 ?C: something from there, probably the stob() macro. (tower_600 only?)
49 ?H:#$d_SHM_MAC SHMLBA_WANTS_SYSMACROS /* SHMLBA wants ctob()? */
50 ?H:#$d_SHM_PRM SHMLBA_WANTS_PARAM /* SHMLBA wants NBPC? */
51 ?H:#$d_SHM_SEG SHMLBA_WANTS_SEG /* SHMLBA wants SNUMSHFT? */
52 ?H:#$d_SHM_IMMU SHMLBA_WANTS_IMMU /* SHMLBA wants stob()? */
54 ?T:flags D_sys_immu D_sys_seg D_sys_sysmacros D_sys_param
55 : check for SHMLBA braindamage
60 if $test "$d_shm" = "$define" ; then
63 Checking to see if SHMLBA needs additional headers.
64 The headers I'll be checking are:
66 sys/macros.h (for the ctob() macro)
67 sys/param.h (for NBPC)
68 sys/seg.h (for SNUMSHFT)
69 sys/immu.h (for the stob() macro)
72 $cat >shm_mac.c <<'EOCP'
73 #include <sys/types.h>
79 #ifdef I_SYS_SYSMACROS
80 #include <sys/sysmacros.h>
83 #include <sys/param.h>
94 for D_sys_immu in '' '-DI_SYS_IMMU'; do
95 for D_sys_seg in '' '-DI_SYS_SEG'; do
96 for D_sys_sysmacros in '' '-DI_SYS_SYSMACROS'; do
97 for D_sys_param in '' '-DI_SYS_PARAM'; do
100 case "$D_sys_immu$D_sys_param$D_sys_sysmacros$D_sys_seg" in
102 echo "Trying it normally..."
105 echo "Trying $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg"
109 $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg \
110 -o shm_mac shm_mac.c >/dev/null 2>&1 ; then
111 set X $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg
114 echo "Succeeded with $flags"
124 echo "I don't know how to keep SHMLBA happy. Good luck!"
128 *I_SYS_PARAM*) d_SHM_PRM="$define";;
131 *I_SYS_SYSMACROS*) d_SHM_MAC="$define";;
134 *I_SYS_SEG*) d_SHM_SEG="$define";;
137 *I_SYS_IMMU*) d_SHM_IMMU="$define";;