New file.
[p5sagit/p5-mst-13.2.git] / hints / os2.sh
CommitLineData
eacfb5f1 1#! /bin/sh
4633a7c4 2# Problems:
3# a) warning from fcntl: Third argument is int in emx - patched
4# b) gr_password is not a structure in struct group - patched
5# c) (gone)
6# d) Makefile needs sh before ./makedir
7# e) (gone)
8# f) (gone)
9# g) (gone)
10# h) (gone)
11# i) (gone)
12# j) the rule true in Makefile should become sh -c true
13# k) Cwd does not work. ===> the extensions cannot be compiled - patched
14# l) TEST expects to get -e 'perl' - patched
15# m) (gone)
16
17# Tests failing with .o compile (this is probably obsolete, but now it is .obj):
18
19# comp/cpp (because of sed above)
20# io/fs.t : (patched) 2..5 7..11 18 (why 11?)
21# io/inplace.t ???? (ak works)
22# io/tell.t 10 ????
23# op/exec.t 1 ???? 4 ????
24# op/glob.t 1 (bug in sh)
25# op/magic.t 4 1/2 (????) adding sleep 5 does not help
26# op/readdir.t 3 (same bug in ksh)
27# op/stat.t 3 4 9 10 20 >34
28
29# Newer results with .obj without i/o optimization, fail:
30
31# io/fs.t : 2+
32# io/pipe.t : 1+
33# io/tell.t : 8, 10
34# op/exec.t : 4, 6 (ok 1 comes as "ok \1")
35# op/fork.t : 1+
36# op/misc.t : 9
37# op/pack.t : 8
38# op/stat.t : 3 4 9 10 20 >34
39# lib/sdbm.t : sdbm store returned -1, errno 0, key "21" at lib/sdbm.t line 112.
40# lib/posix.t : coredump on 3
41
42# If compiled with i/o optimization, then 15% speedup on input, and
43# io/tell.t : 11 only
44# no coredump in posix.t
45
eacfb5f1 46# Note that symbol extraction code gives wrong answers (sometimes?) on
47# gethostent and setsid.
4633a7c4 48
49# Note that during the .obj compile you need to move the perl.dll file
50# to LIBPATH :-(
51
52#osname="OS/2"
eacfb5f1 53sysman=`../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 54cc='gcc'
55usrinc='/emx/include'
eacfb5f1 56libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
57
58if test "$libemx" = "X"; then echo "Cannot find C library!"; fi
59
60libpth="$libemx/st $libemx"
4633a7c4 61
62so='dll'
63
64# Additional definitions:
65
4633a7c4 66firstmakefile='GNUmakefile'
4633a7c4 67exe_ext='.exe'
4633a7c4 68
eacfb5f1 69if [ "$emxaout" != "" ]; then
70 d_shrplib='undef'
71 obj_ext='.o'
72 lib_ext='.a'
73 ar='ar'
74 plibext='.a'
75 d_fork='define'
76 lddlflags='-Zdll'
77 ldflags='-Zexe'
78 ccflags='-DDOSISH -DOS2=2 -DEMBED -I.'
79 use_clib='c'
80else
81 d_shrplib='define'
82 obj_ext='.obj'
83 lib_ext='.lib'
84 ar='emxomfar'
85 plibext='.lib'
86 d_fork='undef'
87 lddlflags='-Zdll -Zomf -Zcrtdll'
88 ldflags='-Zexe -Zomf -Zcrtdll'
89 ccflags='-Zomf -DDOSISH -DOS2=2 -DEMBED -I.'
90 use_clib='c_import'
91fi
92
93# To get into config.sh (should start at the beginning of line)
94plibext="$plibext"
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
103# otherwise puts -lc ???
104
105libs='-lsocket -lm'
eacfb5f1 106archobjs="os2$obj_ext"
4633a7c4 107
108# Run files without extension with sh - feature of patched ksh
109NOHASHBANG=sh
eacfb5f1 110# Same with newer ksh
111EXECSHELL=sh
4633a7c4 112
113cccdlflags='-Zdll'
114dlsrc='dl_os2.xs'
4633a7c4 115ld='gcc'
116usedl='define'
eacfb5f1 117
118#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
4633a7c4 119
120# This variables taken from recommended config.sh
121alignbytes='8'
122
4633a7c4 123# for speedup: (some patches to ungetc are also needed):
124# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
125
eacfb5f1 126stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
4633a7c4 127d_stdstdio='define'
128d_stdiobase='define'
129d_stdio_ptr_lval='define'
130d_stdio_cnt_lval='define'
4633a7c4 131
eacfb5f1 132if test "$stdstdunder" = 0; then
133 stdio_ptr='((fp)->ptr)'
134 stdio_cnt='((fp)->rcount)'
135 stdio_base='((fp)->buffer)'
136 stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
137 ccflags="$ccflags -DMYTTYNAME"
138 myttyname='define'
139else
140 stdio_ptr='((fp)->_ptr)'
141 stdio_cnt='((fp)->_rcount)'
142 stdio_base='((fp)->_buffer)'
143 stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
144fi
145
146# to put into config.sh
147myttyname="$myttyname"
148
149# To have manpages installed
150nroff='nroff.cmd'
151# above will be overwritten otherwise, indented to avoid config.sh
152 _nroff='nroff.cmd'
153
154ln='cp'
155# Will be rewritten otherwise, indented to not put in config.sh
156 _ln='cp'
157lns='cp'
158
159nm_opt='-p'
160
161####### All the rest is commented
4633a7c4 162
163# I do not have these:
164#dynamic_ext='Fcntl GDBM_File SDBM_File POSIX Socket UPM REXXCALL'
eacfb5f1 165#dynamic_ext='Fcntl POSIX Socket SDBM_File Devel/DProf'
4633a7c4 166#extensions='Fcntl GDBM_File SDBM_File POSIX Socket UPM REXXCALL'
eacfb5f1 167#extensions='Fcntl SDBM_File POSIX Socket Devel/DProf'
4633a7c4 168
169# Unknown reasons for:
170#cpio='cpio'
171#csh=''
172#date=''
173#byacc=''
174#d_charsprf='undef'
175#d_drem='undef'
176#d_fmod='define'
177#d_linuxstd='undef'
178#d_socket='define'
179#gcc='gcc'
180#gidtype='gid_t'
181#glibpth='c:/usr/lib/emx h:/emx/lib /emx/lib'
182#groupstype='gid_t'
183#h_fcntl='true'
184#i_time='define'
185#line=''
186#lseektype='off_t'
187#man1ext='1'
188#man3ext='3'
189#modetype='mode_t'
190#more='more'
191#mv='mv'
192#sleep='sleep'
193#socketlib='-lsocket'
194#ssizetype='ssize_t'
195#tar='tar'
196#timetype='time_t'
197#uidtype='uid_t'
198#uname=''
199#uniq=''
200#xlibpth=''
201#yacc='yacc'
202#yaccflags=''
203#zcat='zcat'
204#orderlib='false'
205#pg='pg'
206#pr='pr'
207#ranlib=':'
208
209# Misfound by configure:
210
211#gcc='gcc'
212#more='more'
213#mv='mv'
214#pr='pr'
215#sleep='sleep'
216#tar='tar'
217
eacfb5f1 218#xlibpth=''
4633a7c4 219
220# I cannot stand it, but did not test with:
221# d_dirnamlen='undef'
222
223# I try to do without these:
224
225#d_pwage='undef'
226#d_pwcomment='undef'
227
4633a7c4 228# ????
229#mallocobj=''
230#mallocsrc=''
231#usemymalloc='false'
232
4633a7c4 233# The next two are commented. pdksh handles #!
234# sharpbang='extproc '
235# shsharp='false'
236
237# Commented:
238#startsh='extproc ksh\\n#! sh'