Add workaround for Darwin's (Mac OS X's) INT32_MIN
[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
11prefix='/usr';
12siteprefix='/usr/local';
13vendorprefix='/usr/local'; usevendorprefix='define';
14
15# 4BSD uses /usr/share/man, not /usr/man.
16# Don't put man pages in /usr/lib; that's goofy.
17man1dir='/usr/share/man/man1';
18man3dir='/usr/share/man/man3';
19
20# Where to put modules.
21privlib='/System/Library/Perl';
22sitelib='/Local/Library/Perl';
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.
36libc='/System/Library/Frameworks/System.framework/System';
37
38# Optimize.
39optimize='-O3';
40
41# We have a prototype for telldir.
42ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
43
ccf87481 44# At least OS X 10.0.3:
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
2ece6c11 63# For Errno.
64cppflags='-traditional-cpp';
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
437cf188 94# HFS+ will throw "make depend" into confusion since
d235852b 95# Makefile and makefile are the same.
96firstmakefile=GNUmakefile;
97