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