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