Detypo.
[p5sagit/p5-mst-13.2.git] / hints / os2.sh
index e49ab7f..eb11ff5 100644 (file)
@@ -93,8 +93,10 @@ if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi
 libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`"
 libpth="$libpth $libemx/mt $libemx"
 
-set `emxrev -f emxlibcm`
+set `cmd /c emxrev -f emxlibcm`
 emxcrtrev=$5
+# indented to not put it into config.sh
+  _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev
 
 so='dll'
 
@@ -106,6 +108,10 @@ exe_ext='.exe'
 # We provide it
 i_dlfcn='define'
 
+# -Zomf build has a problem with _exit() *flushing*, so the test
+# gets confused:
+fflushNULL="define"
+
 aout_d_shrplib='undef'
 aout_useshrplib='false'
 aout_obj_ext='.o'
@@ -124,11 +130,13 @@ fi
 aout_ldflags="$aout_ldflags"
 
 aout_d_fork='define'
-aout_ccflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.'
-aout_cppflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.'
+aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
+aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
 aout_use_clib='c'
 aout_usedl='undef'
 aout_archobjs="os2.o dl_os2.o"
+# Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless
+aout_extra_static_ext="OS2::DLL"
 
 # variable which have different values for aout compile
 used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
@@ -165,9 +173,9 @@ else
     # Recursive regmatch may eat 2.5M of stack alone.
     ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000'
     if [ $emxcrtrev -ge 50 ]; then 
-       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I.'
+       ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
     else
-       ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK'
+       ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK $_defemxcrtrev"
     fi
     use_clib='c_import'
     usedl='define'
@@ -247,6 +255,8 @@ nm_opt='-p'
 
 ####### We define these functions ourselves
 
+d_strtoll='define'
+d_strtoull='define'
 d_getprior='define'
 d_setprior='define'
 
@@ -279,8 +289,14 @@ case "$0$running_c_cmd" in
        # Not patched!
        if test -f ./Configure.cmd ; then
            echo "!!!" >&2
-           echo "!!! ./Configure not patched, but ./Configure.cmd exits" >&2
-           echo "!!! Do not know what to do!" >&2
+           echo "!!! I see that what is running is ./Configure." >&2
+           echo "!!! ./Configure is not patched, but ./Configure.cmd exists." >&2
+           echo "!!!" >&2
+           echo "!!! You are supposed to run Configure.cmd, not Configure" >&2
+           echo "!!!  after an automagic patching." >&2
+           echo "!!!" >&2
+           echo "!!! If you insist on running Configure, please" >&2
+           echo "!!!  patch it manually from ./os2/diff.configure." >&2
            echo "!!!" >&2
            exit 2
        fi
@@ -304,10 +320,6 @@ case "$0$running_c_cmd" in
   *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
 esac
 
-# Copy pod:
-
-cp -uf ./README.os2 ./pod/perlos2.pod
-
 # This script UU/usethreads.cbu will get 'called-back' by Configure 
 # after it has prompted the user for whether to use threads.
 cat > UU/usethreads.cbu <<'EOCBU'
@@ -351,5 +363,9 @@ for xxx in * ; do
        fi
 done
 
+case "$ldlibpthname" in
+'') ldlibpthname=none ;;
+esac
+
 # Now go back
 cd ../..