X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fposix-bc.sh;h=683bbccaff89aef5f2dae15d49f94a54a851ba2f;hb=8aa8f774be44d46814d4ddbad03e302f1eb37338;hp=8a4f289a0b8ba9d695c92c197f22632955a93c2d;hpb=c77b533b28c0662914d761b264c2238f98d272a4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh index 8a4f289..683bbcc 100644 --- a/hints/posix-bc.sh +++ b/hints/posix-bc.sh @@ -1,29 +1,119 @@ -#! /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 -# You can override this with Configure -Dcc=gcc -Dld=ld. +# 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 -case "$ld" in -'') ld='c89' ;; -esac # C-Flags: # -DPOSIX_BC # -DUSE_PURE_BISON # -D_XOPEN_SOURCE_EXTENDED alters system headers. -# -DPERL_IGNORE_FPUSIG=SIGFPE # Prepend your favorites with Configure -Dccflags=your_favorites -case "$ccflags" in -'') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE' ;; -*) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE' ;; +ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -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 <