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