This is my patch patch.1j for perl5.001.
[p5sagit/p5-mst-13.2.git] / hints / freebsd.sh
1 # Original based on info from
2 # Carl M. Fongheiser <cmf@ins.infonet.net>
3 # Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
4 #
5 # Additional 1.1.5 defines from 
6 # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
7 # Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
8 #
9 # Additional 2.* defines from
10 # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
11 # Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST)
12 #
13 # Additional 2.0.5 and 2.1 defined from
14 # Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
15 # Date: Fri, 12 May 1995 14:30:38 +0200 (MET DST)
16 #
17 # FreeBSD has the dynamic loading dl*() functions in /usr/lib/crt0.o,
18 # so Configure doesn't find them (unless you abandon the nm scan).
19 #
20 # The two flags "-fpic -DPIC" are used to indicate a
21 # will-be-shared object.  Configure will guess the -fpic, (and the
22 # -DPIC is not used by perl proper) but the full define is included to 
23 # be consistent with the FreeBSD general shared libs building process.
24 #
25 # setreuid and friends are inherently broken in all versions of FreeBSD
26 # before 2.1-current (before approx date 4/15/95). It is fixed in 2.0.5
27 # and what-will-be-2.1
28 #
29
30 case "$osvers" in
31 0.*|1.0*)
32         usedl="$undef"
33         ;;
34 1.1*)   d_dlopen="$define"
35         cccdlflags='-DPIC -fpic'
36         lddlflags="-Bshareable $lddlflags"
37         malloctype='void *'
38         groupstype='int'
39         d_setregid='undef'
40         d_setreuid='undef'
41         d_setrgid='undef'
42         d_setruid='undef'
43         ;;
44 2.0-RELEASE*)
45         d_dlopen="$define"
46         cccdlflags='-DPIC -fpic'
47         lddlflags="-Bshareable $lddlflags"
48         d_setregid='undef'
49         d_setreuid='undef'
50         d_setrgid='undef'
51         d_setruid='undef'
52         ;;
53 #
54 # Trying to cover 2.0.5, 2.1-current and future 2.1
55 # It does not covert all 2.1-current versions as the output of uname
56 # changed a few times.
57 #
58 2.0.5*|2.0-BUILD|2.1*)
59         d_dlopen="$define"
60         cccdlflags='-DPIC -fpic'
61         lddlflags="-Bshareable $lddlflags"
62         # Are these defines necessary?  Doesn't Configure find them
63         # correctly?
64         d_setregid='define'
65         d_setreuid='define'
66         d_setrgid='define'
67         d_setruid='define'
68 esac
69 # Avoid telldir prototype conflict in pp_sys.c  (FreeBSD uses const DIR *)
70 # Configure should test for this.  Volunteers?
71 pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'