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