perl 5.003: hints/bsdos.sh
[p5sagit/p5-mst-13.2.git] / hints / os2.sh
CommitLineData
9a5ea778 1# hints/os2.sh
2# This file reflects the tireless work of
3# Ilya Zakharevich <ilya@math.ohio-state.edu>
4#
5# Trimmed and comments added by
6# Andy Dougherty <doughera@lafcol.lafayette.edu>
7# Exactly what is required beyond a standard OS/2 installation?
8# There are notes about "patched pdksh" I don't understand.
4633a7c4 9
eacfb5f1 10# Note that symbol extraction code gives wrong answers (sometimes?) on
11# gethostent and setsid.
4633a7c4 12
13# Note that during the .obj compile you need to move the perl.dll file
14# to LIBPATH :-(
15
16#osname="OS/2"
eacfb5f1 17sysman=`../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 18cc='gcc'
19usrinc='/emx/include'
eacfb5f1 20libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
21
22if test "$libemx" = "X"; then echo "Cannot find C library!"; fi
23
24libpth="$libemx/st $libemx"
4633a7c4 25
26so='dll'
27
28# Additional definitions:
29
4633a7c4 30firstmakefile='GNUmakefile'
4633a7c4 31exe_ext='.exe'
4633a7c4 32
eacfb5f1 33if [ "$emxaout" != "" ]; then
34 d_shrplib='undef'
35 obj_ext='.o'
36 lib_ext='.a'
37 ar='ar'
38 plibext='.a'
39 d_fork='define'
40 lddlflags='-Zdll'
41 ldflags='-Zexe'
4bf4dbb3 42 ccflags='-DDOSISH -DNO_SYS_ALLOC -DOS2=2 -DEMBED -I. -DPACK_MALLOC'
eacfb5f1 43 use_clib='c'
44else
45 d_shrplib='define'
46 obj_ext='.obj'
47 lib_ext='.lib'
48 ar='emxomfar'
49 plibext='.lib'
50 d_fork='undef'
51 lddlflags='-Zdll -Zomf -Zcrtdll'
4bf4dbb3 52 # Recursive regmatch may eat 2.5M of stack alone.
53 ldflags='-Zexe -Zomf -Zcrtdll -Zstack 32000'
54 ccflags='-Zomf -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC'
eacfb5f1 55 use_clib='c_import'
56fi
57
58# To get into config.sh (should start at the beginning of line)
9a5ea778 59# or you can put it into config.over.
eacfb5f1 60plibext="$plibext"
61
62#libc="/emx/lib/st/c_import$lib_ext"
63libc="$libemx/st/$use_clib$lib_ext"
64
65if test -r "$libemx/c_alias$lib_ext"; then
66 libnames="$libemx/c_alias$lib_ext"
67fi
4633a7c4 68# otherwise puts -lc ???
69
9a5ea778 70# [Maybe we should just remove c from $libswanted ?]
71
4633a7c4 72libs='-lsocket -lm'
eacfb5f1 73archobjs="os2$obj_ext"
4633a7c4 74
75# Run files without extension with sh - feature of patched ksh
9a5ea778 76# [???]
4633a7c4 77NOHASHBANG=sh
eacfb5f1 78# Same with newer ksh
79EXECSHELL=sh
4633a7c4 80
81cccdlflags='-Zdll'
82dlsrc='dl_os2.xs'
4633a7c4 83ld='gcc'
84usedl='define'
eacfb5f1 85
86#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
4633a7c4 87
4633a7c4 88# for speedup: (some patches to ungetc are also needed):
89# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
90
eacfb5f1 91stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
4633a7c4 92d_stdstdio='define'
93d_stdiobase='define'
94d_stdio_ptr_lval='define'
95d_stdio_cnt_lval='define'
4633a7c4 96
eacfb5f1 97if test "$stdstdunder" = 0; then
98 stdio_ptr='((fp)->ptr)'
99 stdio_cnt='((fp)->rcount)'
100 stdio_base='((fp)->buffer)'
101 stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
102 ccflags="$ccflags -DMYTTYNAME"
103 myttyname='define'
104else
105 stdio_ptr='((fp)->_ptr)'
106 stdio_cnt='((fp)->_rcount)'
107 stdio_base='((fp)->_buffer)'
108 stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
109fi
110
111# to put into config.sh
112myttyname="$myttyname"
113
114# To have manpages installed
115nroff='nroff.cmd'
116# above will be overwritten otherwise, indented to avoid config.sh
117 _nroff='nroff.cmd'
118
119ln='cp'
120# Will be rewritten otherwise, indented to not put in config.sh
121 _ln='cp'
122lns='cp'
123
124nm_opt='-p'
125
126####### All the rest is commented
4633a7c4 127
128# I do not have these:
129#dynamic_ext='Fcntl GDBM_File SDBM_File POSIX Socket UPM REXXCALL'
eacfb5f1 130#dynamic_ext='Fcntl POSIX Socket SDBM_File Devel/DProf'
4633a7c4 131#extensions='Fcntl GDBM_File SDBM_File POSIX Socket UPM REXXCALL'
eacfb5f1 132#extensions='Fcntl SDBM_File POSIX Socket Devel/DProf'
4633a7c4 133
4633a7c4 134# The next two are commented. pdksh handles #!
135# sharpbang='extproc '
136# shsharp='false'
137
138# Commented:
139#startsh='extproc ksh\\n#! sh'