3 # This file reflects the tireless work of
4 # Ilya Zakharevich <ilya@math.ohio-state.edu>
6 # Trimmed and comments added by
7 # Andy Dougherty <doughera@lafcol.lafayette.edu>
8 # Exactly what is required beyond a standard OS/2 installation?
9 # There are notes about "patched pdksh" I do not understand.
11 # Note that symbol extraction code gives wrong answers (sometimes?) on
12 # gethostent and setsid.
14 # Note that during the .obj compile you need to move the perl.dll file
17 # Optimization (GNU make 3.74 cannot be loaded :-():
18 emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
19 emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
20 emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
24 if test -f $sh.exe; then sh=$sh.exe; fi
28 sysman=`../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`
31 libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
33 if test "$libemx" = "X"; then echo "Cannot find C library!"; fi
35 libpth="$libemx/mt $libemx"
37 set `emxrev -f emxlibcm`
42 # Additional definitions:
44 firstmakefile='GNUmakefile'
50 aout_d_shrplib='undef'
51 aout_useshrplib='false'
56 aout_lddlflags='-Zdll'
57 if [ $emxcrtrev -ge 50 ]; then
58 aout_ldflags='-Zexe -Zsmall-conv'
63 # To get into config.sh:
64 aout_ldflags="$aout_ldflags"
67 aout_ccflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
68 aout_cppflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
71 aout_archobjs="os2.o dl_os2.o"
73 # variable which have different values for aout compile
74 used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
76 if [ "$emxaout" != "" ]; then
77 d_shrplib="$aout_d_shrplib"
78 useshrplib="$aout_useshrplib"
79 obj_ext="$aout_obj_ext"
80 lib_ext="$aout_lib_ext"
82 plibext="$aout_plibext"
83 if [ $emxcrtrev -lt 50 ]; then
86 lddlflags="$aout_lddlflags"
87 ldflags="$aout_ldflags"
88 ccflags="$aout_ccflags"
89 cppflags="$aout_cppflags"
90 use_clib="$aout_use_clib"
99 if [ $emxcrtrev -ge 50 ]; then
104 lddlflags='-Zdll -Zomf -Zmt -Zcrtdll'
105 # Recursive regmatch may eat 2.5M of stack alone.
106 ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000'
107 if [ $emxcrtrev -ge 50 ]; then
108 ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DTWO_POT_OPTIMIZE -DPERL_EMERGENCY_SBRK'
110 ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DPACK_MALLOC -DDEBUGGING_MSTATS -DEMX_BAD_SBRK'
116 # To get into config.sh (should start at the beginning of line)
117 # or you can put it into config.over.
119 # plibext is not needed anymore. Just directly set $libperl.
120 libperl="libperl${plibext}"
122 #libc="/emx/lib/st/c_import$lib_ext"
123 libc="$libemx/mt/$use_clib$lib_ext"
125 if test -r "$libemx/c_alias$lib_ext"; then
126 libnames="$libemx/c_alias$lib_ext"
128 # otherwise puts -lc ???
130 # [Maybe we should just remove c from $libswanted ?]
133 archobjs="os2$obj_ext dl_os2$obj_ext"
135 # Run files without extension with sh:
142 #cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
144 # for speedup: (some patches to ungetc are also needed):
145 # Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
147 stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
150 d_stdio_ptr_lval='define'
151 d_stdio_cnt_lval='define'
153 if test "$stdstdunder" = 0; then
154 stdio_ptr='((fp)->ptr)'
155 stdio_cnt='((fp)->rcount)'
156 stdio_base='((fp)->buffer)'
157 stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
158 ccflags="$ccflags -DMYTTYNAME"
161 stdio_ptr='((fp)->_ptr)'
162 stdio_cnt='((fp)->_rcount)'
163 stdio_base='((fp)->_buffer)'
164 stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
167 # to put into config.sh
168 myttyname="$myttyname"
170 # To have manpages installed
172 # above will be overwritten otherwise, indented to avoid config.sh
175 # should be handled automatically by Configure now.
177 # Will be rewritten otherwise, indented to not put in config.sh
183 ####### We define these functions ourselves
188 ####### All the rest is commented
190 # The next two are commented. pdksh handles #!
191 # sharpbang='extproc '
195 #startsh='extproc ksh\\n#! sh'
199 cp ../README.os2 ../pod/perlos2.pod
201 # Now install the external modules. We are in the ./hints directory.
205 if ! test -d ../../ext/OS2 ; then
209 cp -rfu * ../../ext/OS2/
214 if $test -d $xxx/t; then
215 cp -uf $xxx/t/*.t ../../t/lib
217 if $test -d $xxx; then
220 if $test -d $yyy/t; then
221 cp -uf $yyy/t/*.t ../../t/lib