X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fposix-bc.sh;h=683bbccaff89aef5f2dae15d49f94a54a851ba2f;hb=d041ed074ea76d111d3116540927bbe2727c442a;hp=2e46b8cf00dc3813954f24511be2e2512a0b563a;hpb=c8e8bf6a4feca6a069b306dce3bede9ce9da14ca;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh index 2e46b8c..683bbcc 100644 --- a/hints/posix-bc.sh +++ b/hints/posix-bc.sh @@ -1,42 +1,172 @@ -#! /usr/bin/bash -norc +: # hints/posix-bc.sh # # BS2000 (Posix Subsystem) hints by Thomas Dorner # -# thanks to the authors of the os390.sh +# 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. -# To get ANSI C, we need to use c89, and ld does not exist -cc='c89' -ld='c89' +# 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: -ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' +# -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 -D_XOPEN_SOURCE_EXTENDED" -# Flags on a RISC-Host (SUNRISE): +# Now, what kind of BS2000 system are we running on? +echo if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then - echo - echo "Congratulations, you are running a machine with Sunrise CPUs." + 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" - ldflags='-K risc_4000' + 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 <