This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH 5.6.1] OS2 Configure
[perl5.git] / hints / darwin.sh
CommitLineData
f556e5b9
JH
1##
2# Darwin (Mac OS) hints
437cf188 3# Wilfredo Sanchez <wsanchez@mit.edu>
f556e5b9
JH
4##
5
6##
7# Paths
8##
9
10# BSD paths
e32f0149
JH
11case "$prefix" in
12'')
13 prefix='/usr/local'; # Built-in perl uses /usr
14 siteprefix='/usr/local';
15 vendorprefix='/usr/local'; usevendorprefix='define';
16
17 # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
18 # Don't put man pages in ${prefix}/lib; that's goofy.
19 man1dir="${prefix}/share/man/man1";
20 man3dir="${prefix}/share/man/man3";
21
22 # Where to put modules.
23 # Built-in perl uses /System/Library/Perl
24 privlib='/Library/Perl';
25 sitelib='/Library/Perl';
26 vendorlib='/Network/Library/Perl';
27 ;;
28esac
f556e5b9
JH
29
30##
31# Tool chain settings
32##
33
34# Since we can build fat, the archname doesn't need the processor type
35archname='darwin';
36
37# nm works.
38usenm='true';
39
40# Libc is in libsystem.
4e644a1e 41#libc='/usr/lib/libSystem.dylib';
f556e5b9
JH
42
43# Optimize.
44optimize='-O3';
45
46# We have a prototype for telldir.
47ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
48
4e644a1e 49# At least on Darwin 1.3.x:
ccf87481
JH
50#
51# # define INT32_MIN -2147483648
52# int main () {
53# double a = INT32_MIN;
54# printf ("INT32_MIN=%g\n", a);
55# return 0;
56# }
57# will output:
58# INT32_MIN=2.14748e+09
59# Note that the INT32_MIN has become positive.
60# INT32_MIN is set in /usr/include/stdint.h by:
61# #define INT32_MIN -2147483648
62# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
63# seems to work. INT64_MIN seems to be similarly broken.
64# -- Nicholas Clark, Ken Williams, and Edward Moy
65#
66ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN"
67
4e644a1e 68# cpp-precomp is problematic.
0511a818 69cppflags='-traditional-cpp';
2ece6c11 70
f556e5b9
JH
71# Shared library extension is .dylib.
72# Bundle extension is .bundle.
73ld='cc';
74so='dylib';
75dlext='bundle';
76dlsrc='dl_dyld.xs'; usedl='define';
c374061b 77cccdlflags=' '; # space, not empty, because otherwise we get -fpic
f556e5b9
JH
78lddlflags="${ldflags} -bundle -undefined suppress";
79ldlibpthname='DYLD_LIBRARY_PATH';
80useshrplib='true';
81
82##
83# System libraries
84##
85
86# vfork works
87usevfork='true';
88
89# malloc works
90usemymalloc='n';
2ece6c11 91
d235852b
PP
92##
93# Build process
94##
95
96# Locales aren't feeling well.
97LC_ALL=C; export LC_ALL;
98
4e644a1e
W
99# Case-insensitive filesystems don't get along with Makefile and
100# makefile in the same place. Since Darwin uses GNU make, this dodges
101# the problem.
d235852b 102firstmakefile=GNUmakefile;