Commit | Line | Data |
0093f865 |
1 | # hints/sunos_4_1.sh |
bd89102f |
2 | # Last modified: Wed May 27 11:00:02 EDT 1998 |
1973dd96 |
3 | # Andy Dougherty <doughera@lafayette.edu> |
0093f865 |
4 | |
a0d0e21e |
5 | case "$cc" in |
54000519 |
6 | *gcc*) usevfork=false |
7 | # GNU as and GNU ld might not work. See the INSTALL file. |
8 | ;; |
a0d0e21e |
9 | *) usevfork=true ;; |
10 | esac |
0093f865 |
11 | |
12 | # Configure will issue a WHOA warning. The problem is that |
13 | # Configure finds getzname, not tzname. If you're in the System V |
14 | # environment, you can set d_tzname='define' since tzname[] is |
15 | # available in the System V environment. |
a0d0e21e |
16 | d_tzname='undef' |
0093f865 |
17 | |
54000519 |
18 | # Configure will issue a WHOA warning. The problem is that unistd.h |
19 | # contains incorrect prototypes for some functions in the usual |
20 | # BSD-ish environment. In particular, it has |
21 | # extern int getgroups(/* int gidsetsize, gid_t grouplist[] */); |
22 | # but groupslist[] ought to be of type int, not gid_t. |
23 | # This is only really a problem for perl if the |
24 | # user is using gcc, and not running in the SysV environment. |
25 | # The gcc fix-includes script exposes those incorrect prototypes. |
26 | # There may be other examples as well. Volunteers are welcome to |
27 | # track them all down :-). In the meantime, we'll just skip unistd.h |
a71cd7cd |
28 | # for SunOS in most of the code. |
29 | # However, see ext/POSIX/hints/sunos_4.pl for one exception. |
54000519 |
30 | i_unistd='undef' |
a71cd7cd |
31 | # See util.c for another: We need _SC_OPEN_MAX, which is in |
32 | # <unistd.h>. |
d2201af2 |
33 | |
34 | # fflush(NULL) will core dump on SunOS 4.1.3. In util.c we'll |
35 | # try explicitly fflushing all open files. Unfortunately, |
36 | # on my SunOS 4.1.3 system, sysconf(_SC_OPEN_MAX) returns |
37 | # 64, but only 32 of those file pointers can be accessed |
38 | # directly by _iob[i]. The remainder are off in dynamically |
39 | # allocated memory somewhere and I don't know to automatically |
40 | # fflush() them. -- Andy Dougherty Wed May 26 15:25:22 EDT 1999 |
41 | util_cflags='ccflags="$ccflags -DPERL_FFLUSH_ALL_FOPEN_MAX=32"' |
54000519 |
42 | |
43 | cat << 'EOM' >&4 |
44 | |
45 | You will probably see *** WHOA THERE!!! *** messages from Configure for |
46 | d_tzname and i_unistd. Keep the recommended values. See |
47 | hints/sunos_4_1.sh for more information. |
48 | EOM |
49 | |
137a3082 |
50 | # The correct setting of groupstype depends on which version of the C |
51 | # library is used. If you are in the 'System V environment' |
52 | # (i.e. you have /usr/5bin ahead of /usr/bin in your PATH), and |
53 | # you use Sun's cc compiler, then you'll pick up /usr/5bin/cc, which |
54 | # links against the C library in /usr/5lib. This library has |
55 | # groupstype='gid_t'. |
56 | # If you are in the normal BSDish environment, then you'll pick up |
57 | # /usr/ucb/cc, which links against the C library in /usr/lib. That |
58 | # library has groupstype='int'. |
59 | # |
60 | # If you are using gcc, it links against the C library in /usr/lib |
61 | # independent of whether or not you are in the 'System V environment'. |
62 | # If you want to use the System V libraries, then you need to |
63 | # manually set groupstype='gid_t' and add explicit references to |
64 | # /usr/5lib when Configure prompts you for where to look for libraries. |
65 | # |
90248788 |
66 | # Check if user is in a bsd or system 5 type environment |
a0d0e21e |
67 | if cat -b /dev/null 2>/dev/null |
68 | then # bsd |
69 | groupstype='int' |
70 | else # sys5 |
137a3082 |
71 | case "$cc" in |
72 | *gcc*) groupstype='int';; # gcc doesn't do anything special |
73 | *) groupstype='gid_t';; # /usr/5bin/cc pulls in /usr/5lib/ stuff. |
74 | esac |
a0d0e21e |
75 | fi |
77c65e92 |
76 | |
77 | # If you get the message "unresolved symbol '__lib_version' " while |
78 | # linking, your system probably has the optional 'acc' compiler (and |
79 | # libraries) installed, but you are using the bundled 'cc' compiler with |
80 | # the unbundled libraries. The solution is either to use 'acc' and the |
81 | # unbundled libraries (specifically /lib/libm.a), or 'cc' and the bundled |
82 | # library. |
83 | # |
84 | # Thanks to William Setzer <William_Setzer@ncsu.edu> for this info. |
b76f91fc |
85 | |
86 | # Don't use the GNU ld, that doesn't work, you'll get a lot of |
87 | # relocation truncated to fit: BASE13 ... |
88 | # from many extensions, like B and Data::Dumper. |
89 | ld=/usr/bin/ld |
90 | |
42600de6 |
91 | # As of Perl 5.8.1 it seems that dynaloading is broken in SunOS 4.x, sniff. |
92 | case "$usedl" in |
93 | '') usedl=undef ;; |
94 | esac |
95 | |