6d94bdbd1fc9513e28042093f82f54317460aa28
[p5sagit/p5-mst-13.2.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@lafcol.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 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.
16 d_tzname='undef'
17
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
28 # for SunOS in most of the code.   
29 # However, see ext/POSIX/hints/sunos_4.pl for one exception.
30 i_unistd='undef'
31 # See util.c for another:  We need _SC_OPEN_MAX, which is in
32 # <unistd.h>.
33 util_cflags='ccflags="$ccflags -DI_UNISTD"'
34
35 cat << 'EOM' >&4
36
37 You will probably see  *** WHOA THERE!!! ***  messages from Configure for
38 d_tzname and i_unistd.  Keep the recommended values.  See
39 hints/sunos_4_1.sh for more information.
40 EOM
41
42 # The correct setting of groupstype depends on which version of the C
43 # library is used.  If you are in the 'System V environment'
44 # (i.e. you have /usr/5bin ahead of /usr/bin in your PATH), and
45 # you use Sun's cc compiler, then you'll pick up /usr/5bin/cc, which
46 # links against the C library in /usr/5lib.  This library has
47 # groupstype='gid_t'.
48 # If you are in the normal BSDish environment, then you'll pick up
49 # /usr/ucb/cc, which links against the C library in /usr/lib.  That
50 # library has groupstype='int'.
51 #
52 # If you are using gcc, it links against the C library in /usr/lib
53 # independent of whether or not you are in the 'System V environment'.
54 # If you want to use the System V libraries, then you need to 
55 # manually set groupstype='gid_t' and add explicit references to 
56 # /usr/5lib when Configure prompts you for where to look for libraries.
57 #
58 # Check if user is in a bsd or system 5 type environment
59 if cat -b /dev/null 2>/dev/null
60 then # bsd
61       groupstype='int'
62 else # sys5
63     case "$cc" in
64         *gcc*) groupstype='int';; # gcc doesn't do anything special
65         *) groupstype='gid_t';; # /usr/5bin/cc pulls in /usr/5lib/ stuff.
66     esac
67 fi
68
69 # If you get the message "unresolved symbol '__lib_version' " while
70 # linking, your system probably has the optional 'acc' compiler (and
71 # libraries) installed, but you are using the bundled 'cc' compiler with
72 # the unbundled libraries.  The solution is either to use 'acc' and the
73 # unbundled libraries (specifically /lib/libm.a), or 'cc' and the bundled
74 # library.
75
76 # Thanks to William Setzer <William_Setzer@ncsu.edu> for this info.