Add workaround for Darwin's (Mac OS X's) INT32_MIN
[p5sagit/p5-mst-13.2.git] / hints / darwin.sh
1 ##
2 # Darwin (Mac OS) hints
3 # Wilfredo Sanchez <wsanchez@mit.edu>
4 ##
5
6 ##
7 # Paths
8 ##
9
10 # BSD paths
11 prefix='/usr';
12 siteprefix='/usr/local';
13 vendorprefix='/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.
17 man1dir='/usr/share/man/man1';
18 man3dir='/usr/share/man/man3';
19
20 # Where to put modules.
21 privlib='/System/Library/Perl';
22 sitelib='/Local/Library/Perl';
23 vendorlib='/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
30 archname='darwin';
31
32 # nm works.
33 usenm='true';
34
35 # Libc is in libsystem.
36 libc='/System/Library/Frameworks/System.framework/System';
37
38 # Optimize.
39 optimize='-O3';
40
41 # We have a prototype for telldir.
42 ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
43
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 #
61 ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN"
62
63 # For Errno.
64 cppflags='-traditional-cpp';
65
66 # Shared library extension is .dylib.
67 # Bundle extension is .bundle.
68 ld='cc';
69 so='dylib';
70 dlext='bundle';
71 dlsrc='dl_dyld.xs'; usedl='define';
72 cccdlflags=' '; # space, not empty, because otherwise we get -fpic
73 lddlflags="${ldflags} -bundle -undefined suppress";
74 ldlibpthname='DYLD_LIBRARY_PATH';
75 useshrplib='true';
76
77 ##
78 # System libraries
79 ##
80
81 # vfork works
82 usevfork='true';
83
84 # malloc works
85 usemymalloc='n';
86
87 ##
88 # Build process
89 ##
90
91 # Locales aren't feeling well.
92 LC_ALL=C; export LC_ALL;
93
94 # HFS+ will throw "make depend" into confusion since
95 # Makefile and makefile are the same.
96 firstmakefile=GNUmakefile;
97