perl 5.003_04: hints/irix_6_2.sh hints/mpeix.sh
[p5sagit/p5-mst-13.2.git] / hints / os2.sh
CommitLineData
cf8a192d 1#! /bin/sh
9a5ea778 2# hints/os2.sh
3# This file reflects the tireless work of
4# Ilya Zakharevich <ilya@math.ohio-state.edu>
5#
6# Trimmed and comments added by
7# Andy Dougherty <doughera@lafcol.lafayette.edu>
8# Exactly what is required beyond a standard OS/2 installation?
cf8a192d 9# There are notes about "patched pdksh" I do not understand.
4633a7c4 10
eacfb5f1 11# Note that symbol extraction code gives wrong answers (sometimes?) on
12# gethostent and setsid.
4633a7c4 13
14# Note that during the .obj compile you need to move the perl.dll file
15# to LIBPATH :-(
16
31e507d9 17# Should be done automatically by Configure now:
cf8a192d 18bin_sh=`../UU/loc sh.exe /bin c:/bin d:/bin e:/bin f:/bin g:/bin h:/bin /bin`
19echo "####### Shell found at $bin_sh #############" >&4
760ac839 20sh="$bin_sh"
21startsh="#!$bin_sh"
cf8a192d 22
4633a7c4 23#osname="OS/2"
eacfb5f1 24sysman=`../UU/loc . /man/man1 c:/man/man1 c:/usr/man/man1 d:/man/man1 d:/usr/man/man1 e:/man/man1 e:/usr/man/man1 f:/man/man1 f:/usr/man/man1 g:/man/man1 g:/usr/man/man1 /usr/man/man1`
4633a7c4 25cc='gcc'
26usrinc='/emx/include'
eacfb5f1 27libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
28
29if test "$libemx" = "X"; then echo "Cannot find C library!"; fi
30
31libpth="$libemx/st $libemx"
4633a7c4 32
33so='dll'
34
35# Additional definitions:
36
4633a7c4 37firstmakefile='GNUmakefile'
4633a7c4 38exe_ext='.exe'
4633a7c4 39
cf8a192d 40# We provide it
41i_dlfcn='define'
42
43aout_d_shrplib='undef'
31e507d9 44aout_useshrplib='false'
cf8a192d 45aout_obj_ext='.o'
46aout_lib_ext='.a'
47aout_ar='ar'
48aout_plibext='.a'
49aout_d_fork='define'
50aout_lddlflags='-Zdll'
51aout_ldflags='-Zexe'
52aout_ccflags='-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS'
53aout_cppflags='-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC =DDEBUGGING_MSTATS'
54aout_use_clib='c'
55aout_usedl='undef'
56aout_archobjs="os2.o dl_os2.o"
57
58# variable which have different values for aout compile
31e507d9 59used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
cf8a192d 60
eacfb5f1 61if [ "$emxaout" != "" ]; then
cf8a192d 62 d_shrplib="$aout_d_shrplib"
31e507d9 63 useshrplib="$aout_useshrplib"
cf8a192d 64 obj_ext="$aout_obj_ext"
65 lib_ext="$aout_lib_ext"
66 ar="$aout_ar"
67 plibext="$aout_plibext"
68 d_fork="$aout_d_fork"
69 lddlflags="$aout_lddlflags"
70 ldflags="$aout_ldflags"
71 ccflags="$aout_ccflags"
72 cppflags="$aout_cppflags"
73 use_clib="$aout_use_clib"
74 usedl="$aout_usedl"
eacfb5f1 75else
76 d_shrplib='define'
31e507d9 77 useshrplib='true'
eacfb5f1 78 obj_ext='.obj'
79 lib_ext='.lib'
80 ar='emxomfar'
81 plibext='.lib'
82 d_fork='undef'
760ac839 83 lddlflags='-Zdll -Zomf -Zmt -Zcrtdll'
4bf4dbb3 84 # Recursive regmatch may eat 2.5M of stack alone.
760ac839 85 ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000'
86 ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS'
eacfb5f1 87 use_clib='c_import'
cf8a192d 88 usedl='define'
eacfb5f1 89fi
90
91# To get into config.sh (should start at the beginning of line)
9a5ea778 92# or you can put it into config.over.
eacfb5f1 93plibext="$plibext"
31e507d9 94# plibext is not needed anymore. Just directly set $libperl.
95libperl="libperl${plibext}"
eacfb5f1 96
97#libc="/emx/lib/st/c_import$lib_ext"
98libc="$libemx/st/$use_clib$lib_ext"
99
100if test -r "$libemx/c_alias$lib_ext"; then
101 libnames="$libemx/c_alias$lib_ext"
102fi
4633a7c4 103# otherwise puts -lc ???
104
9a5ea778 105# [Maybe we should just remove c from $libswanted ?]
106
4633a7c4 107libs='-lsocket -lm'
cf8a192d 108archobjs="os2$obj_ext dl_os2$obj_ext"
4633a7c4 109
110# Run files without extension with sh - feature of patched ksh
9a5ea778 111# [???]
cf8a192d 112# NOHASHBANG=sh
eacfb5f1 113# Same with newer ksh
114EXECSHELL=sh
4633a7c4 115
116cccdlflags='-Zdll'
cf8a192d 117dlsrc='dl_dlopen.xs'
4633a7c4 118ld='gcc'
eacfb5f1 119
120#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
4633a7c4 121
4633a7c4 122# for speedup: (some patches to ungetc are also needed):
123# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
124
eacfb5f1 125stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
4633a7c4 126d_stdstdio='define'
127d_stdiobase='define'
128d_stdio_ptr_lval='define'
129d_stdio_cnt_lval='define'
4633a7c4 130
eacfb5f1 131if test "$stdstdunder" = 0; then
132 stdio_ptr='((fp)->ptr)'
133 stdio_cnt='((fp)->rcount)'
134 stdio_base='((fp)->buffer)'
135 stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
136 ccflags="$ccflags -DMYTTYNAME"
137 myttyname='define'
138else
139 stdio_ptr='((fp)->_ptr)'
140 stdio_cnt='((fp)->_rcount)'
141 stdio_base='((fp)->_buffer)'
142 stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
143fi
144
145# to put into config.sh
146myttyname="$myttyname"
147
148# To have manpages installed
149nroff='nroff.cmd'
150# above will be overwritten otherwise, indented to avoid config.sh
151 _nroff='nroff.cmd'
152
31e507d9 153# should be handled automatically by Configure now.
eacfb5f1 154ln='cp'
155# Will be rewritten otherwise, indented to not put in config.sh
156 _ln='cp'
157lns='cp'
158
159nm_opt='-p'
160
cf8a192d 161####### We define these functions ourselves
4633a7c4 162
cf8a192d 163d_getprior='define'
164d_setprior='define'
165
166####### All the rest is commented
4633a7c4 167
4633a7c4 168# The next two are commented. pdksh handles #!
169# sharpbang='extproc '
170# shsharp='false'
171
172# Commented:
173#startsh='extproc ksh\\n#! sh'
760ac839 174
175# Now install the external modules. We are in the ./hints directory.
176
177cd ../os2/OS2
178
179if ! test -d ../../ext/OS2 ; then
180 mkdir ../../ext/OS2
181fi
182
183cp -rfu * ../../ext/OS2/
184
185# Install tests:
186
187for xxx in * ; do
188 if $test -d $xxx/t; then
189 cp -uf $xxx/t/*.t ../../t/lib
190 else
191 if $test -d $xxx; then
192 cd $xxx
193 for yyy in * ; do
194 if $test -d $yyy/t; then
195 cp -uf $yyy/t/*.t ../../t/lib
196 fi
197 done
198 cd ..
199 fi
200 fi
201done
202
203
204# Now go back
205cd ../../hints