Commit | Line | Data |
a1a0e61e |
1 | #! /usr/bin/bash -norc |
2 | # hints/posix-bc.sh |
3 | # |
4 | # BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de> |
5 | # |
6 | # thanks to the authors of the os390.sh |
7 | # |
8 | |
c8e8bf6a |
9 | # To get ANSI C, we need to use c89, and ld does not exist |
a7a44c04 |
10 | # You can override this with Configure -Dcc=gcc -Dld=ld. |
11 | case "$cc" in |
12 | '') cc='c89' ;; |
13 | esac |
14 | case "$ld" in |
15 | '') ld='c89' ;; |
16 | esac |
a1a0e61e |
17 | |
18 | # C-Flags: |
a7a44c04 |
19 | # -DPOSIX_BC |
20 | # -DUSE_PURE_BISON |
21 | # -D_XOPEN_SOURCE_EXTENDED alters system headers. |
22 | # Prepend your favorites with Configure -Dccflags=your_favorites |
23 | case "$ccflags" in |
24 | '') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;; |
25 | *) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;; |
26 | esac |
27 | |
28 | # ccdlflags have yet to be determined. |
29 | #case "$ccdlflags" in |
30 | #'') ccdlflags='-c' ;; |
31 | #esac |
32 | |
33 | # cccdlflags have yet to be determined. |
34 | #case "$cccdlflags" in |
35 | #'') cccdlflags='' ;; |
36 | #esac |
37 | |
38 | # ldflags have yet to be determined. |
39 | #case "$ldflags" in |
40 | #'') ldflags='' ;; |
41 | #esac |
42 | |
43 | # lddlflags have yet to be determined. |
44 | #case "$lddlflags" in |
45 | #'') lddlflags='' ;; |
46 | #esac |
a1a0e61e |
47 | |
4113c5bc |
48 | # Flags on a RISC-Host (SUNRISE): |
49 | if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then |
50 | echo |
51 | echo "Congratulations, you are running a machine with Sunrise CPUs." |
52 | echo "Let's hope you have the matching RISC compiler as well." |
c8e8bf6a |
53 | ccflags="-K risc_4000 $ccflags" |
4113c5bc |
54 | ldflags='-K risc_4000' |
55 | fi |
56 | |
a1a0e61e |
57 | # Turning on optimization breaks perl (CORE-DUMP): |
a7a44c04 |
58 | # You can override this with Configure -Doptimize='-O' or somesuch. |
59 | case "$optimize" in |
60 | '') optimize='none' ;; |
61 | esac |
a1a0e61e |
62 | |
63 | # we don''t use dynamic memorys (yet): |
a7a44c04 |
64 | case "$so" in |
65 | '') so='none' ;; |
66 | esac |
67 | |
68 | case "$usemymalloc" in |
69 | '') usemymalloc='n' ;; |
70 | esac |
a1a0e61e |
71 | |
c8e8bf6a |
72 | # On BS2000/Posix, libc.a does not really hold anything at all, |
a1a0e61e |
73 | # so running nm on it is pretty useless. |
a7a44c04 |
74 | # You can override this with Configure -Dusenm. |
75 | case "$usenm" in |
76 | '') usenm='false' ;; |
77 | esac |
a1a0e61e |
78 | |
a7a44c04 |
79 | # Dynamic loading doesn't work on OS/390 quite yet. |
80 | # You can override this with |
81 | # Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. |
82 | case "$usedl" in |
83 | '') usedl='n' ;; |
84 | esac |
85 | case "$dlext" in |
86 | '') dlext='none' ;; |
87 | esac |
88 | #case "$dlsrc" in |
89 | #'') dlsrc='none' ;; |
90 | #esac |
91 | #case "$ldlibpthname" in |
92 | #'') ldlibpthname=LIBPATH ;; |
93 | #esac |
a1a0e61e |
94 | |