perl

 view release on metacpan or  search on metacpan

hints/os2.sh  view on Meta::CPAN


if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi

# Acute backslashitis:
libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`"
libpth="$libpth $libemx/mt $libemx"

set `cmd /c emxrev -f emxlibcm`
emxcrtrev=$5
# indented to not put it into config.sh
  _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev

so='dll'

# Additional definitions:

firstmakefile='GNUmakefile'
exe_ext='.exe'

# We provide it
i_dlfcn='define'

# The default one uses exponential notation between 0.0001 and 0.1
d_Gconvert='gcvt_os2((x),(n),(b))'

cat > UU/uselongdouble.cbu <<'EOCBU'
# This script UU/uselongdouble.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use long doubles.
# If we will use them, let Configure choose us a Gconvert.
case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in
"$define:$define:$define:$define") d_Gconvert='' ;;
esac
EOCBU

# -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'
aout_lib_ext='.a'
aout_ar='ar'
aout_plibext='.a'
aout_lddlflags="-Zdll $ld_dll_optimize"

# -D__ST_MT_ERRNO__ allows a quick relink with -Zmtd to check problems
# which may be due to linking with -Zmtd DLLs

# Cannot have 32000K stack: get SYS0170  ?!
if [ $emxcrtrev -ge 50 ]; then 
    aout_ldflags='-Zexe -Zsmall-conv -Zstack 16000 -D__ST_MT_ERRNO__'
else
    aout_ldflags='-Zexe -Zstack 16000 -D__ST_MT_ERRNO__'
fi

# To get into config.sh:
aout_ldflags="$aout_ldflags"

aout_d_fork='define'
aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"
aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev -D__ST_MT_ERRNO__"
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'

if [ "$emxaout" != "" ]; then
    d_shrplib="$aout_d_shrplib"
    useshrplib="$aout_useshrplib"
    obj_ext="$aout_obj_ext"
    lib_ext="$aout_lib_ext"
    ar="$aout_ar"
    plibext="$aout_plibext"
    if [ $emxcrtrev -lt 50 ]; then 
	d_fork="$aout_d_fork"
    fi
    lddlflags="$aout_lddlflags"
    ldflags="$aout_ldflags"
    ccflags="$aout_ccflags"
    cppflags="$aout_cppflags"
    use_clib="$aout_use_clib"
    usedl="$aout_usedl"
else
    d_shrplib='define'
    useshrplib='true'
    obj_ext='.obj'
    lib_ext='.lib'
    ar='emxomfar'
    plibext='.lib'
    if [ $emxcrtrev -ge 50 ]; then 
	d_fork='define'
    else
	d_fork='undef'
    fi
    lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2"
    # Recursive regmatch may eat 2.5M of stack alone.
    ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e:2'
    if [ $emxcrtrev -ge 50 ]; then 
	ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
    else
	ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK $_defemxcrtrev"
    fi
    use_clib='c_import'
    usedl='define'
fi

# indented to miss config.sh
  _ar="$ar"

# To get into config.sh (should start at the beginning of line)
# or you can put it into config.over.
plibext="$plibext"
# plibext is not needed anymore.  Just directly set $libperl.
libperl="libperl${plibext}"

#libc="/emx/lib/st/c_import$lib_ext"
libc="$libemx/mt/$use_clib$lib_ext"

if test -r "$libemx/c_alias$lib_ext"; then 
    libnames="$libemx/c_alias$lib_ext"
fi
# otherwise puts -lc ???

# [Maybe we should just remove c from $libswanted ?]

# Test would pick up wrong rand, so we hardwire the value for random()
libs='-lsocket -lm -lbsd'
randbits=31
archobjs="os2$obj_ext dl_os2$obj_ext"

# Run files without extension with sh:
EXECSHELL=sh

cccdlflags='-Zdll'
dlsrc='dl_dlopen.xs'
ld='gcc'

#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'

# for speedup: (some patches to ungetc are also needed):
# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails

stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
d_stdstdio='define'
d_stdiobase='define'
d_stdio_ptr_lval='define'
d_stdio_cnt_lval='define'

if test "$stdstdunder" = 0; then
  stdio_ptr='((fp)->ptr)'
  stdio_cnt='((fp)->rcount)'
  stdio_base='((fp)->buffer)'
  stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
  ccflags="$ccflags -DMYTTYNAME"
  myttyname='define'
else
  stdio_ptr='((fp)->_ptr)'
  stdio_cnt='((fp)->_rcount)'
  stdio_base='((fp)->_buffer)'
  stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
fi

# to put into config.sh
myttyname="$myttyname"

# To have manpages installed
nroff='nroff.cmd'
# above will be overwritten otherwise, indented to avoid config.sh
  _nroff='nroff.cmd'

# should be handled automatically by Configure now.
ln='cp'
# Will be rewritten otherwise, indented to not put in config.sh
  _ln='cp'
lns='cp'

nm_opt='-p'

####### We define these functions ourselves

d_strtoll='define'
d_strtoull='define'
d_getprior='define'
d_setprior='define'
d_usleep='define'
d_usleepproto='define'

# The next two are commented. pdksh handles #!, extproc gives no path part.
# sharpbang='extproc '
# shsharp='false'

# Commented:
#startsh='extproc ksh\\n#! sh'

# Find patch:
gnupatch='patch'
if (gnupatch -v || gnupatch --version)   2>&1 >/dev/null; then
    gnupatch=gnupatch



( run in 0.983 second using v1.01-cache-2.11-cpan-71847e10f99 )