summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.ohio-state.edu>1997-09-05 00:00:00 +0000
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-09-05 00:00:00 +0000
commitf3e7aa1bd0d29123d18a8cc60ae49ae884b4a820 (patch)
tree7470ba7004ab45fd1817c3ad3be42f9d3b18bb66 /hints
parent333dae79e9c817f845b3ec7164c7278322e9a3bb (diff)
downloadperl-f3e7aa1bd0d29123d18a8cc60ae49ae884b4a820.tar.gz
OS/2 Hints
People build OS/2 Perl on weirder and weirder configured systems, so I needed to add a full-featured gcc environment parser... :-( Enjoy, p5p-msgid: 199710130631.CAA25426@monk.mps.ohio-state.edu
Diffstat (limited to 'hints')
-rw-r--r--hints/os2.sh60
1 files changed, 44 insertions, 16 deletions
diff --git a/hints/os2.sh b/hints/os2.sh
index b468f2de41..2a589b5cb4 100644
--- a/hints/os2.sh
+++ b/hints/os2.sh
@@ -6,14 +6,11 @@
# Trimmed and comments added by
# Andy Dougherty <doughera@lafcol.lafayette.edu>
# Exactly what is required beyond a standard OS/2 installation?
-# There are notes about "patched pdksh" I do not understand.
+# (see in README.os2)
# Note that symbol extraction code gives wrong answers (sometimes?) on
# gethostent and setsid.
-# Note that during the .obj compile you need to move the perl.dll file
-# to LIBPATH :-(
-
# Optimization (GNU make 3.74 cannot be loaded :-():
emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
@@ -24,28 +21,59 @@ path_sep=\;
if test -f $sh.exe; then sh=$sh.exe; fi
startsh="#!$sh"
-
-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`
cc='gcc'
-usrinc='/emx/include'
-emxpath="`../UU/loc . /emx c:/emx d:/emx e:/emx f:/emx g:/emx h:/emx /emx`"
-libemx="$emxpath/lib"
+# Get some standard things (indented to avoid putting in config.sh):
+ oifs="$IFS"
+ IFS=" ;"
+ set $MANPATH
+ tryman="$@"
+ set $LIBRARY_PATH
+ libemx="$@"
+ set $C_INCLUDE_PATH
+ usrinc="$@"
+ IFS="$oifs"
+ tryman="`../UU/loc . /man $tryman`"
+ tryman="`echo $tryman | tr '\\\' '/'`"
+
+ # indented to avoid having it *two* times at start
+ libemx="`../UU/loc os2.a /emx/lib $libemx`"
+
+usrinc="`../UU/loc stdlib.h /emx/include $usrinc`"
+usrinc="`dirname $usrinc | tr '\\\' '/'`"
+libemx="`dirname $libemx | tr '\\\' '/'`"
+
+if test -d $tryman/man1; then
+ sysman="$tryman/man1"
+else
+ 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`"
+fi
+
+emxpath="`dirname $libemx`"
+if test ! -d "$emxpath"; then
+ emxpath="`../UU/loc . /emx c:/emx d:/emx e:/emx f:/emx g:/emx h:/emx /emx`"
+fi
+
+if test ! -d "$libemx"; then
+ libemx="$emxpath/lib"
+fi
if test ! -d "$libemx"; then
if test -d "$LIBRARY_PATH"; then
- usrinc="$LIBRARY_PATH"
+ libemx="$LIBRARY_PATH"
else
libemx="`../UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
fi
fi
-if test -d "$emxpath/include"; then
- usrinc="$emxpath/include"
-else
- if test -d "$C_INCLUDE_PATH"; then
- usrinc="$C_INCLUDE_PATH"
+if test ! -d "$usrinc"; then
+ if test -d "$emxpath/include"; then
+ usrinc="$emxpath/include"
else
- usrinc="`../UU/loc . X c:/emx/include d:/emx/include e:/emx/include f:/emx/include g:/emx/include h:/emx/include /emx/include`"
+ if test -d "$C_INCLUDE_PATH"; then
+ usrinc="$C_INCLUDE_PATH"
+ else
+ usrinc="`../UU/loc . X c:/emx/include d:/emx/include e:/emx/include f:/emx/include g:/emx/include h:/emx/include /emx/include`"
+ fi
fi
fi