Commit | Line | Data |
---|---|---|
86339dc9 | 1 | # hints/os390.sh |
9d116dd7 JH |
2 | # |
3 | # OS/390 hints by David J. Fiander <davidf@mks.com> | |
4 | # | |
86339dc9 | 5 | # OS/390 OpenEdition Release 3 Mon Sep 22 1997 thanks to: |
ac9901e0 PP |
6 | # |
7 | # John Goodyear <johngood@us.ibm.com> | |
86339dc9 TB |
8 | # John Pfuntner <pfuntner@vnet.ibm.com> |
9 | # Len Johnson <lenjay@ibm.net> | |
10 | # Bud Huff <BAHUFF@us.oracle.com> | |
11 | # Peter Prymmer <pvhp@forte.com> | |
12 | # Andy Dougherty <doughera@lafcol.lafayette.edu> | |
13 | # Tim Bunce <Tim.Bunce@ig.co.uk> | |
14 | # | |
15 | # as well as the authors of the aix.sh file | |
16 | # | |
17 | ||
9d116dd7 | 18 | # To get ANSI C, we need to use c89, and ld doesn't exist |
5f912e1c PP |
19 | # You can override this with Configure -Dcc=gcc -Dld=ld. |
20 | case "$cc" in | |
21 | '') cc='c89' ;; | |
22 | esac | |
23 | case "$ld" in | |
24 | '') ld='c89' ;; | |
25 | esac | |
26 | ||
27 | # -DMAXSIG=38 maximum signal number | |
eb3f6d21 JH |
28 | # -DPERL_IGNORE_FPUSIG=SIGFPE allows Perl to be cavalier with FP overflow |
29 | # (particularly in numeric.c:S_mulexp10()) | |
5f912e1c PP |
30 | # -DOEMVS is used in place of #ifdef __MVS__ in certain places. |
31 | # -D_OE_SOCKETS alters system headers. | |
32 | # -D_XOPEN_SOURCE_EXTENDEDA alters system headers. | |
33 | # c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again. | |
9d116dd7 | 34 | # YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant. |
5f912e1c PP |
35 | # -DEBCDIC should come from Configure and need not be mentioned here. |
36 | # Prepend your favorites with Configure -Dccflags=your_favorites | |
37 | case "$ccflags" in | |
eb3f6d21 JH |
38 | '') ccflags='-DMAXSIG=38 -DPERL_IGNORE_FPUSIG=SIGFPE -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;; |
39 | *) ccflags="$ccflags -DMAXSIG=38 -DPERL_IGNORE_FPUSIG=SIGFPE -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;; | |
5f912e1c PP |
40 | esac |
41 | ||
42 | # Turning on optimization breaks perl. | |
43 | # You can override this with Configure -Doptimize='-O' or somesuch. | |
44 | case "$optimize" in | |
45 | '') optimize='none' ;; | |
46 | esac | |
47 | ||
5f912e1c PP |
48 | # To link via definition side decks we need the dll option |
49 | # You can override this with Configure -Ucccdlflags or somesuch. | |
50 | case "$cccdlflags" in | |
ac9901e0 | 51 | '') cccdlflags='-W 0,dll' ;; |
5f912e1c PP |
52 | esac |
53 | ||
5f912e1c PP |
54 | case "$so" in |
55 | '') so='a' ;; | |
56 | esac | |
9d116dd7 | 57 | |
5f912e1c PP |
58 | case "$alignbytes" in |
59 | '') alignbytes=8 ;; | |
60 | esac | |
9d116dd7 | 61 | |
5f912e1c PP |
62 | case "$usemymalloc" in |
63 | '') usemymalloc='n' ;; | |
64 | esac | |
9d116dd7 JH |
65 | |
66 | # On OS/390, libc.a doesn't really hold anything at all, | |
67 | # so running nm on it is pretty useless. | |
5f912e1c PP |
68 | # You can override this with Configure -Dusenm. |
69 | case "$usenm" in | |
70 | '') usenm='false' ;; | |
71 | esac | |
9d116dd7 | 72 | |
59c9e5d6 PP |
73 | # Setting ldflags='-Wl,EDIT=NO' will get rid of the symbol |
74 | # information at the end of the executable (=> smaller binaries). | |
75 | # Override this option with -Dldflags='whatever else you wanted'. | |
76 | case "$ldflags" in | |
77 | '') ldflags='-Wl,EDIT=NO' ;; | |
78 | esac | |
79 | ||
80 | # In order to build with dynamic be sure to specify: | |
81 | # Configure -Dusedl | |
82 | # Do not forget to add $archlibexp/CORE to your LIBPATH. | |
83 | # You might want to override some of this with things like: | |
ac9901e0 | 84 | # Configure -Dusedl -Ddlext=so -Ddlsrc=dl_dllload.xs. |
5f912e1c | 85 | case "$usedl" in |
ac9901e0 PP |
86 | '') |
87 | usedl='n' | |
88 | case "$dlext" in | |
89 | '') dlext='none' ;; | |
90 | esac | |
91 | ;; | |
92 | define) | |
93 | case "$useshrplib" in | |
94 | '') useshrplib='true' ;; | |
95 | esac | |
ac9901e0 PP |
96 | case "$dlsrc" in |
97 | '') dlsrc='dl_dllload.xs' ;; | |
98 | esac | |
f2766b05 PP |
99 | # For performance use 'so' at or beyond v2.8, 'dll' for 2.7 and prior versions |
100 | case "`uname -v`x`uname -r`" in | |
101 | 02x0[89].*|02x1[0-9].*|[0-9][3-9]x*) | |
102 | so='so' | |
103 | case "$dlext" in | |
104 | '') dlext='so' ;; | |
105 | esac | |
106 | ;; | |
107 | *) | |
108 | so='dll' | |
109 | case "$dlext" in | |
110 | '') dlext='dll' ;; | |
111 | esac | |
112 | ;; | |
113 | esac | |
114 | libperl="libperl.$so" | |
ac9901e0 PP |
115 | ccflags="$ccflags -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll" |
116 | cccdlflags='-c -Wc,dll,EXPORTALL' | |
f2766b05 PP |
117 | # The following will need to be modified for the installed libperl.x. |
118 | # The modification to Config.pm is done by the installperl script after the build and test. | |
ac9901e0 | 119 | ccdlflags="-W l,dll `pwd`/libperl.x" |
f2766b05 | 120 | lddlflags="-W l,dll `pwd`/libperl.x" |
ac9901e0 | 121 | ;; |
5f912e1c | 122 | esac |
ac9901e0 | 123 | # even on static builds using LIBPATH should be OK. |
5f912e1c PP |
124 | case "$ldlibpthname" in |
125 | '') ldlibpthname=LIBPATH ;; | |
126 | esac | |
9d116dd7 | 127 | |
5f912e1c PP |
128 | # Header files to include. |
129 | # You can override these with Configure -Ui_time -Ui_systime. | |
130 | case "$i_time" in | |
131 | '') i_time='define' ;; | |
132 | esac | |
133 | case "$i_systime" in | |
134 | '') i_systime='define' ;; | |
135 | esac | |
86339dc9 TB |
136 | |
137 | # (from aix.sh) | |
138 | # uname -m output is too specific and not appropriate here | |
9d116dd7 | 139 | # osname should come from Configure |
5f912e1c | 140 | # You can override this with Configure -Darchname='s390' but please don't. |
86339dc9 TB |
141 | case "$archname" in |
142 | '') archname="$osname" ;; | |
143 | esac | |
144 | ||
5f912e1c PP |
145 | # We have our own cppstdin script. This is not a variable since |
146 | # Configure sees the presence of the script file. | |
147 | # We put system header -D definitions in so that Configure | |
148 | # can find the shmat() prototype in <sys/shm.h> and various | |
149 | # other things. Unfortunately, cppflags occurs too late to be of | |
150 | # value external to the script. This may need to be revisited | |
151 | # under a compiler other than c89. | |
f2766b05 PP |
152 | case "$usedl" in |
153 | define) | |
154 | echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -D_SHR_ENVIRON -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin | |
155 | ;; | |
156 | *) | |
5f912e1c | 157 | echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin |
f2766b05 PP |
158 | ;; |
159 | esac | |
23e2eca9 PP |
160 | |
161 | # | |
5f912e1c | 162 | # Note that Makefile.SH employs a bare yacc command to generate |
23e2eca9 PP |
163 | # perly.[hc] and a2p.[hc], hence you may wish to: |
164 | # | |
165 | # alias yacc='myyacc' | |
166 | # | |
167 | # Then if you would like to use myyacc and skip past the | |
168 | # following warnings try invoking Configure like so: | |
169 | # | |
170 | # sh Configure -Dbyacc=yacc | |
171 | # | |
172 | # This trick ought to work even if your yacc is byacc. | |
173 | # | |
174 | if test "X$byacc" = "Xbyacc" ; then | |
175 | if test -e /etc/yyparse.c ; then | |
176 | : we should be OK - perhaps do a test -r? | |
177 | else | |
178 | cat <<EOWARN >&4 | |
179 | ||
180 | Warning. You do not have a copy of yyparse.c, the default | |
181 | yacc parser template file, in place in /etc. | |
182 | EOWARN | |
183 | if test -e /samples/yyparse.c ; then | |
184 | cat <<EOWARN >&4 | |
185 | ||
186 | There does appear to be a template file in /samples though. | |
187 | Please run: | |
188 | ||
189 | cp /samples/yyparse.c /etc | |
190 | ||
191 | before attempting to Configure the build of $package. | |
192 | ||
193 | EOWARN | |
194 | else | |
195 | cat <<EOWARN >&4 | |
196 | ||
197 | There does not appear to be one in /samples either. | |
198 | If you feel you can make use of an alternate yacc-like | |
199 | parser generator then please read the comments in the | |
200 | hints/os390.sh file carefully. | |
201 | ||
202 | EOWARN | |
203 | fi | |
204 | exit 1 | |
205 | fi | |
206 | fi | |
207 |