3 # OS/390 hints by David J. Fiander <davidf@mks.com>
5 # OS/390 OpenEdition Release 3 Mon Sep 22 1997 thanks to:
7 # John Goodyear <johngood@us.ibm.com>
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@lafayette.edu>
13 # Tim Bunce <Tim.Bunce@ig.co.uk>
15 # as well as the authors of the aix.sh file
18 # To get ANSI C, we need to use c89, and ld doesn't exist
19 # You can override this with Configure -Dcc=gcc -Dld=ld.
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.
32 # YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant.
33 # -DEBCDIC should come from Configure and need not be mentioned here.
34 # Prepend your favorites with Configure -Dccflags=your_favorites
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" ;;
40 # Turning on optimization breaks perl.
41 # You can override this with Configure -Doptimize='-O' or somesuch.
43 '') optimize='none' ;;
46 # To link via definition side decks we need the dll option
47 # You can override this with Configure -Ucccdlflags or somesuch.
49 '') cccdlflags='-W 0,dll' ;;
60 case "$usemymalloc" in
61 '') usemymalloc='n' ;;
64 # On OS/390, libc.a doesn't really hold anything at all,
65 # so running nm on it is pretty useless.
66 # You can override this with Configure -Dusenm.
71 # Setting ldflags='-Wl,EDIT=NO' will get rid of the symbol
72 # information at the end of the executable (=> smaller binaries).
73 # Override this option with -Dldflags='whatever else you wanted'.
75 '') ldflags='-Wl,EDIT=NO' ;;
78 # In order to build with dynamic be sure to specify:
80 # Do not forget to add $archlibexp/CORE to your LIBPATH.
81 # You might want to override some of this with things like:
82 # Configure -Dusedl -Ddlext=so -Ddlsrc=dl_dllload.xs.
92 '') useshrplib='true' ;;
95 '') dlsrc='dl_dllload.xs' ;;
97 # For performance use 'so' at or beyond v2.8, 'dll' for 2.7 and prior versions
98 case "`uname -v`x`uname -r`" in
99 02x0[89].*|02x1[0-9].*|[0-9][3-9]x*)
112 libperl="libperl.$so"
113 ccflags="$ccflags -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll"
114 cccdlflags='-c -Wc,dll,EXPORTALL'
115 # The following will need to be modified for the installed libperl.x.
116 # The modification to Config.pm is done by the installperl script after the build and test.
117 ccdlflags="-W l,dll `pwd`/libperl.x"
118 lddlflags="-W l,dll `pwd`/libperl.x"
121 # even on static builds using LIBPATH should be OK.
122 case "$ldlibpthname" in
123 '') ldlibpthname=LIBPATH ;;
126 # Header files to include.
127 # You can override these with Configure -Ui_time -Ui_systime.
129 '') i_time='define' ;;
132 '') i_systime='define' ;;
134 case "$d_pthread_atfork" in
135 '') d_pthread_atfork='undef' ;;
139 # uname -m output is too specific and not appropriate here
140 # osname should come from Configure
141 # You can override this with Configure -Darchname='s390' but please don't.
143 '') archname="$osname" ;;
146 # We have our own cppstdin script. This is not a variable since
147 # Configure sees the presence of the script file.
148 # We put system header -D definitions in so that Configure
149 # can find the shmat() prototype in <sys/shm.h> and various
150 # other things. Unfortunately, cppflags occurs too late to be of
151 # value external to the script. This may need to be revisited
152 # under a compiler other than c89.
155 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
158 echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin
163 # Note that Makefile.SH employs a bare yacc command to generate
164 # perly.[hc] and a2p.[hc], hence you may wish to:
166 # alias yacc='myyacc'
168 # Then if you would like to use myyacc and skip past the
169 # following warnings try invoking Configure like so:
171 # sh Configure -Dbyacc=yacc
173 # This trick ought to work even if your yacc is byacc.
175 if test "X$byacc" = "Xbyacc" ; then
176 if test -e /etc/yyparse.c ; then
177 : we should be OK - perhaps do a test -r?
181 Warning. You do not have a copy of yyparse.c, the default
182 yacc parser template file, in place in /etc.
184 if test -e /samples/yyparse.c ; then
187 There does appear to be a template file in /samples though.
190 cp /samples/yyparse.c /etc
192 before attempting to Configure the build of $package.
198 There does not appear to be one in /samples either.
199 If you feel you can make use of an alternate yacc-like
200 parser generator then please read the comments in the
201 hints/os390.sh file carefully.
209 # Most of the time gcvt() seems to work fine but
210 # sometimes values like 0.1, 0.2, come out as "10", "20",
211 # a trivial Perl demonstration snippet is 'print 0.1'.
212 # The -W 0,float(ieee) seems to be the switch breaking gcvt().
213 # sprintf() seems to get things right(er).
214 gconvert_preference=sprintf
216 cat >config.arch<<'__CONFIG_ARCH__'
217 # The '-W 0,float(ieee)' cannot be used during Configure as ldflags.
219 ccflags="$ccflags -W 0,float(ieee)"