|
|
:
# hints/posix-bc.sh
#
# BS2000 (Posix Subsystem) hints by Thomas Dorner
#
# Thanks to the authors of the os390.sh for the very first draft.
#
# You can modify almost any parameter set here using Configure with
# the appropriate -D option.
# remove this line if dynamic libraries are working for you:
bs2000_ignoredl='y'
# To get ANSI C, we need to use c89
# You can override this with Configure -Dcc=gcc
# (if you ever get a gcc ported to BS2000 ;-).
case "$cc" in
'') cc='c89' ;;
esac
# C-Flags:
# -DPOSIX_BC
# -DUSE_PURE_BISON
# -D_XOPEN_SOURCE_EXTENDED alters system headers.
# Prepend your favorites with Configure -Dccflags=your_favorites
ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -DYYMAXDEPTH=65000 -DYYINITDEPTH=1000 -D_XOPEN_SOURCE_EXTENDED"
# Now, what kind of BS2000 system are we running on?
echo
if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
echo "You are running a BS2000 machine with Sunrise CPUs."
echo "Let's hope you have the matching RISC compiler as well."
ccflags="-K risc_4000 $ccflags"
bs2000_ldflags='-K risc_4000'
else
echo "Seems like a standard 390 BS2000 machine to me."
bs2000_ldflags=''
fi
echo
if [ -z "$bs2000_ignoredl" -a -e /usr/lib/libdl.a ]; then
echo "Wow, your BS2000 is State Of The Art and seems to support dynamic libraries."
echo "I just can't resist giving them a try."
bs2000_lddlflags='-Bsymbolic -Bdynamic'
# dynamic linkage of system libraries gave us runtime linker
# errors, so we use static linkage while generating our DLLs :-(
# bs2000_lddlflags='-Bstatic'
bs2000_so='none'
bs2000_usedl='define'
bs2000_dlext='so'
case $bs2000_ldflags in
*risc_4000*)
bs2000_ld="perl_genso"
echo "
Now you must buy everything they sell you, musn't you?
Didn't somebody tell you that RISC machines and dynamic library support gives
you helluva lot of configuration problems at the moment?
Sigh. Now you'll expect me to fix it for you, eh?
OK, OK, I'll give you a wrapper.
Just copy $bs2000_ld anywhere into your path before you try to install
additional modules!"
cat > $bs2000_ld <
|