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