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