This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[win32] integrate mainline
[perl5.git] / hints / svr4.sh
1 # svr4 hints, System V Release 4.x
2 # Last modified 1996/10/25 by Tye McQueen, tye@metronet.com
3 # Merged 1998/04/23 with perl5.004_04 distribution by 
4 # Andy Dougherty <doughera@lafayette.edu>
5
6 # Use Configure -Dcc=gcc to use gcc.
7 case "$cc" in
8 '') cc='/bin/cc'
9     test -f $cc || cc='/usr/ccs/bin/cc'
10     ;;
11 esac
12
13 # We include support for using libraries in /usr/ucblib, but the setting
14 # of libswanted excludes some libraries found there.  If you run into
15 # problems, you may have to remove "ucb" from libswanted.  Just delete
16 # the comment '#' from the sed command below.
17 ldflags='-L/usr/ccs/lib -L/usr/ucblib'
18 ccflags='-I/usr/include -I/usr/ucbinclude'
19 # Don't use problematic libraries:
20 libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
21 # libmalloc.a - Probably using Perl's malloc() anyway.
22 # libucb.a - Remove it if you have problems ld'ing.  We include it because
23 #   it is needed for ODBM_File and NDBM_File extensions.
24
25 if [ -r /usr/ucblib/libucb.a ]; then    # If using BSD-compat. library:
26     d_Gconvert='gcvt'   # Try gcvt() before gconvert().
27     # Use the "native" counterparts, not the BSD emulation stuff:
28     d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef'
29     d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
30     d_setlinebuf='undef' 
31     # d_setregid='undef' d_setreuid='undef'  # ???
32 fi
33
34 # UnixWare has /usr/lib/libc.so.1, /usr/lib/libc.so.1.1, and
35 # /usr/ccs/lib/libc.so.  Configure chooses libc.so.1.1 while it
36 # appears that /usr/ccs/lib/libc.so contains more symbols:
37 #
38 # Try the following if you want to use nm-extraction.  We'll just
39 # skip the nm-extraction phase, since searching for all the different
40 # library versions will be hard to keep up-to-date.
41 #
42 # if [ "" = "$libc" -a -f /usr/ccs/lib/libc.so -a \
43 #   -f /usr/lib/libc.so.1 -a -f /usr/lib/libc.so.1.1 ]; then
44 #     if nm -h /usr/ccs/lib/libc.so | egrep '\<_?select$' >/dev/null; then
45 #       if nm -h /usr/lib/libc.so.1 | egrep '\<_?select$'` >/dev/null ||
46 #          nm -h /usr/lib/libc.so.1.1 | egrep '\<_?select$'` >/dev/null; then
47 #           :
48 #       else
49 #           libc=/usr/ccs/lib/libc.so
50 #       fi
51 #     fi
52 # fi
53 #
54 #  Don't bother with nm.  Just compile & link a small C program.
55 case "$usenm" in
56 '') usenm=false;;
57 esac
58
59 # Broken C-Shell tests (Thanks to Tye McQueen):
60 # The OS-specific checks may be obsoleted by the this generic test.
61         sh_cnt=`sh -c 'echo /*' | wc -c`
62         csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c`
63         csh_cnt=`expr 1 + $csh_cnt`
64 if [ "$sh_cnt" -ne "$csh_cnt" ]; then
65     echo "You're csh has a broken 'glob', disabling..." >&2
66     d_csh='undef'
67 fi
68
69 # UnixWare has a broken csh.  The undocumented -X argument to uname is probably
70 # a reasonable way of detecting UnixWare.  Also in 2.1.1 the fields in
71 # FILE* got renamed! Plus 1.1 can't cast large floats to 32-bit ints.
72 #       Leave leading tabs so Configure doesn't propagate these variables
73         uw_ver=`uname -v`
74         uw_isuw=`uname -X 2>&1 | grep Release`
75 if [ "$uw_isuw" = "Release = 4.2" ]; then
76    case $uw_ver in
77    1.1)
78       d_casti32='undef'
79       ;;
80    esac
81 fi
82 if [ "$uw_isuw" = "Release = 4.2MP" ]; then
83    case $uw_ver in
84    2.1)
85         d_csh='undef'
86         ;;
87    2.1.*)
88         d_csh='undef'
89         stdio_cnt='((fp)->__cnt)'
90         d_stdio_cnt_lval='define'
91         stdio_ptr='((fp)->__ptr)'
92         d_stdio_ptr_lval='define'
93         ;;
94    esac
95 fi
96
97 # DDE SMES Supermax Enterprise Server
98 case "`uname -sm`" in
99 "UNIX_SV SMES")
100     # the *grent functions are in libgen.
101     libswanted="$libswanted gen"
102     # csh is broken (also) in SMES
103     # This may already be detected by the generic test above.
104     d_csh='undef'
105     case "$cc" in
106     *gcc*) ;;
107     *)  # for cc we need -K PIC (not -K pic)
108         cccdlflags="$cccdlflags -K PIC"
109         ;;
110     esac
111     ;;
112 esac
113
114 # Configure may fail to find lstat() since it's a static/inline function
115 # in <sys/stat.h> on Unisys U6000 SVR4, UnixWare 2.x, and possibly other
116 # SVR4 derivatives.  (Though UnixWare has it in /usr/ccs/lib/libc.so.)
117 d_lstat=define
118
119 d_suidsafe='define'     # "./Configure -d" can't figure this out easilly
120
121 cat <<'EOM' >&4
122
123 If you wish to use dynamic linking, you must use 
124         LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
125 or
126         setenv LD_LIBRARY_PATH `pwd`
127 before running make.
128
129 EOM