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: |
6 | # |
7 | # John Pfuntner <pfuntner@vnet.ibm.com> |
8 | # Len Johnson <lenjay@ibm.net> |
9 | # Bud Huff <BAHUFF@us.oracle.com> |
10 | # Peter Prymmer <pvhp@forte.com> |
11 | # Andy Dougherty <doughera@lafcol.lafayette.edu> |
12 | # Tim Bunce <Tim.Bunce@ig.co.uk> |
13 | # |
14 | # as well as the authors of the aix.sh file |
15 | # |
16 | |
9d116dd7 |
17 | # To get ANSI C, we need to use c89, and ld doesn't exist |
5f912e1c |
18 | # You can override this with Configure -Dcc=gcc -Dld=ld. |
19 | case "$cc" in |
20 | '') cc='c89' ;; |
21 | esac |
22 | case "$ld" in |
23 | '') ld='c89' ;; |
24 | esac |
25 | |
26 | # -DMAXSIG=38 maximum signal number |
27 | # -DOEMVS is used in place of #ifdef __MVS__ in certain places. |
28 | # -D_OE_SOCKETS alters system headers. |
29 | # -D_XOPEN_SOURCE_EXTENDEDA alters system headers. |
30 | # c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again. |
9d116dd7 |
31 | # YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant. |
5f912e1c |
32 | # -DEBCDIC should come from Configure and need not be mentioned here. |
33 | # Prepend your favorites with Configure -Dccflags=your_favorites |
34 | case "$ccflags" in |
35 | '') ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;; |
36 | *) ccflags="$ccflags -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;; |
37 | esac |
38 | |
39 | # Turning on optimization breaks perl. |
40 | # You can override this with Configure -Doptimize='-O' or somesuch. |
41 | case "$optimize" in |
42 | '') optimize='none' ;; |
43 | esac |
44 | |
45 | # ccdlflags have yet to be determined. |
46 | #case "$ccdlflags" in |
47 | #'') ccdlflags='-c' ;; |
48 | #esac |
49 | |
50 | # To link via definition side decks we need the dll option |
51 | # You can override this with Configure -Ucccdlflags or somesuch. |
52 | case "$cccdlflags" in |
53 | '') cccdlflags='-W 0,dll,"langlvl(extended)"' ;; |
54 | esac |
55 | |
56 | # ldflags have yet to be determined. |
57 | #case "$ldflags" in |
58 | #'') ldflags='' ;; |
59 | #esac |
60 | |
61 | # lddlflags have yet to be determined. |
62 | #case "$lddlflags" in |
63 | #'') lddlflags='' ;; |
64 | #esac |
9d116dd7 |
65 | |
5f912e1c |
66 | case "$so" in |
67 | '') so='a' ;; |
68 | esac |
9d116dd7 |
69 | |
5f912e1c |
70 | case "$alignbytes" in |
71 | '') alignbytes=8 ;; |
72 | esac |
9d116dd7 |
73 | |
5f912e1c |
74 | case "$usemymalloc" in |
75 | '') usemymalloc='n' ;; |
76 | esac |
9d116dd7 |
77 | |
78 | # On OS/390, libc.a doesn't really hold anything at all, |
79 | # so running nm on it is pretty useless. |
5f912e1c |
80 | # You can override this with Configure -Dusenm. |
81 | case "$usenm" in |
82 | '') usenm='false' ;; |
83 | esac |
9d116dd7 |
84 | |
5f912e1c |
85 | # Dynamic loading doesn't work on OS/390 quite yet. |
86 | # You can override this with |
87 | # Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. |
88 | case "$usedl" in |
89 | '') usedl='n' ;; |
90 | esac |
91 | case "$dlext" in |
92 | '') dlext='none' ;; |
93 | esac |
94 | #case "$dlsrc" in |
95 | #'') dlsrc='none' ;; |
96 | #esac |
97 | case "$ldlibpthname" in |
98 | '') ldlibpthname=LIBPATH ;; |
99 | esac |
9d116dd7 |
100 | |
5f912e1c |
101 | # Header files to include. |
102 | # You can override these with Configure -Ui_time -Ui_systime. |
103 | case "$i_time" in |
104 | '') i_time='define' ;; |
105 | esac |
106 | case "$i_systime" in |
107 | '') i_systime='define' ;; |
108 | esac |
86339dc9 |
109 | |
110 | # (from aix.sh) |
111 | # uname -m output is too specific and not appropriate here |
9d116dd7 |
112 | # osname should come from Configure |
5f912e1c |
113 | # You can override this with Configure -Darchname='s390' but please don't. |
86339dc9 |
114 | case "$archname" in |
115 | '') archname="$osname" ;; |
116 | esac |
117 | |
5f912e1c |
118 | # Architecture related object files. |
119 | # ebcdic.c contains special \cX mapping code for EBCDIC char sets. |
120 | # Prepend your preference with Configure -Darchobs=your_preference.o. |
121 | case "$archname" in |
122 | '') archobjs="ebcdic.o" ;; |
123 | *) archobjs="$archobjs ebcdic.o" ;; |
124 | esac |
1cfa4ec7 |
125 | |
5f912e1c |
126 | # We have our own cppstdin script. This is not a variable since |
127 | # Configure sees the presence of the script file. |
128 | # We put system header -D definitions in so that Configure |
129 | # can find the shmat() prototype in <sys/shm.h> and various |
130 | # other things. Unfortunately, cppflags occurs too late to be of |
131 | # value external to the script. This may need to be revisited |
132 | # under a compiler other than c89. |
133 | echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin |
23e2eca9 |
134 | |
135 | # |
5f912e1c |
136 | # Note that Makefile.SH employs a bare yacc command to generate |
23e2eca9 |
137 | # perly.[hc] and a2p.[hc], hence you may wish to: |
138 | # |
139 | # alias yacc='myyacc' |
140 | # |
141 | # Then if you would like to use myyacc and skip past the |
142 | # following warnings try invoking Configure like so: |
143 | # |
144 | # sh Configure -Dbyacc=yacc |
145 | # |
146 | # This trick ought to work even if your yacc is byacc. |
147 | # |
148 | if test "X$byacc" = "Xbyacc" ; then |
149 | if test -e /etc/yyparse.c ; then |
150 | : we should be OK - perhaps do a test -r? |
151 | else |
152 | cat <<EOWARN >&4 |
153 | |
154 | Warning. You do not have a copy of yyparse.c, the default |
155 | yacc parser template file, in place in /etc. |
156 | EOWARN |
157 | if test -e /samples/yyparse.c ; then |
158 | cat <<EOWARN >&4 |
159 | |
160 | There does appear to be a template file in /samples though. |
161 | Please run: |
162 | |
163 | cp /samples/yyparse.c /etc |
164 | |
165 | before attempting to Configure the build of $package. |
166 | |
167 | EOWARN |
168 | else |
169 | cat <<EOWARN >&4 |
170 | |
171 | There does not appear to be one in /samples either. |
172 | If you feel you can make use of an alternate yacc-like |
173 | parser generator then please read the comments in the |
174 | hints/os390.sh file carefully. |
175 | |
176 | EOWARN |
177 | fi |
178 | exit 1 |
179 | fi |
180 | fi |
181 | |