Commit | Line | Data |
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 |
e32f0149 |
11 | case "$prefix" in |
187122cb |
12 | '') |
13 | # Default install; use non-system directories |
e32f0149 |
14 | prefix='/usr/local'; # Built-in perl uses /usr |
15 | siteprefix='/usr/local'; |
16 | vendorprefix='/usr/local'; usevendorprefix='define'; |
17 | |
187122cb |
18 | # Where to put modules. |
19 | privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl |
20 | sitelib='/Library/Perl'; |
21 | vendorlib='/Network/Library/Perl'; |
22 | ;; |
23 | '/usr') |
24 | # We are building/replacing the built-in perl |
25 | siteprefix='/usr/local'; |
26 | vendorprefix='/usr/local'; usevendorprefix='define'; |
e32f0149 |
27 | |
28 | # Where to put modules. |
187122cb |
29 | privlib='/System/Library/Perl'; |
e32f0149 |
30 | sitelib='/Library/Perl'; |
31 | vendorlib='/Network/Library/Perl'; |
32 | ;; |
33 | esac |
f556e5b9 |
34 | |
187122cb |
35 | # 4BSD uses ${prefix}/share/man, not ${prefix}/man. |
187122cb |
36 | man1dir="${prefix}/share/man/man1"; |
37 | man3dir="${prefix}/share/man/man3"; |
38 | |
f556e5b9 |
39 | ## |
40 | # Tool chain settings |
41 | ## |
42 | |
43 | # Since we can build fat, the archname doesn't need the processor type |
44 | archname='darwin'; |
45 | |
46 | # nm works. |
47 | usenm='true'; |
48 | |
f556e5b9 |
49 | # Optimize. |
23131aa4 |
50 | if [ "x$optimize" = 'x' ]; then |
51 | optimize='-O3' |
52 | fi |
f556e5b9 |
53 | |
187122cb |
54 | # XXX Unclear why we require -pipe and -fno-common here. --Andy Dougherty |
55 | # We don't like commons. --Fred Sánchez |
0ac8ade1 |
56 | ccflags="${ccflags} -pipe -fno-common" |
f556e5b9 |
57 | |
4e644a1e |
58 | # At least on Darwin 1.3.x: |
ccf87481 |
59 | # |
60 | # # define INT32_MIN -2147483648 |
61 | # int main () { |
62 | # double a = INT32_MIN; |
63 | # printf ("INT32_MIN=%g\n", a); |
64 | # return 0; |
65 | # } |
66 | # will output: |
67 | # INT32_MIN=2.14748e+09 |
68 | # Note that the INT32_MIN has become positive. |
69 | # INT32_MIN is set in /usr/include/stdint.h by: |
70 | # #define INT32_MIN -2147483648 |
71 | # which seems to break the gcc. Defining INT32_MIN as (-2147483647-1) |
72 | # seems to work. INT64_MIN seems to be similarly broken. |
73 | # -- Nicholas Clark, Ken Williams, and Edward Moy |
74 | # |
75 | ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" |
76 | |
4e644a1e |
77 | # cpp-precomp is problematic. |
0511a818 |
78 | cppflags='-traditional-cpp'; |
2ece6c11 |
79 | |
f556e5b9 |
80 | # Shared library extension is .dylib. |
81 | # Bundle extension is .bundle. |
82 | ld='cc'; |
83 | so='dylib'; |
84 | dlext='bundle'; |
85 | dlsrc='dl_dyld.xs'; usedl='define'; |
c374061b |
86 | cccdlflags=' '; # space, not empty, because otherwise we get -fpic |
f556e5b9 |
87 | lddlflags="${ldflags} -bundle -undefined suppress"; |
88 | ldlibpthname='DYLD_LIBRARY_PATH'; |
89 | useshrplib='true'; |
90 | |
91 | ## |
92 | # System libraries |
93 | ## |
94 | |
95 | # vfork works |
96 | usevfork='true'; |
97 | |
98 | # malloc works |
99 | usemymalloc='n'; |
2ece6c11 |
100 | |
d235852b |
101 | ## |
102 | # Build process |
103 | ## |
104 | |
105 | # Locales aren't feeling well. |
106 | LC_ALL=C; export LC_ALL; |
107 | |
4e644a1e |
108 | # Case-insensitive filesystems don't get along with Makefile and |
109 | # makefile in the same place. Since Darwin uses GNU make, this dodges |
110 | # the problem. |
d235852b |
111 | firstmakefile=GNUmakefile; |