Re: Patch for hints/darwin.sh
[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/local'; # Built-in perl uses /usr
12 siteprefix='/usr/local';
13 vendorprefix='/usr/local'; usevendorprefix='define';
14
15 # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
16 # Don't put man pages in ${prefix}/lib; that's goofy.
17 man1dir="${prefix}/share/man/man1";
18 man3dir="${prefix}/share/man/man3";
19
20 # Where to put modules.
21 privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl
22 sitelib='/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='/usr/lib/libSystem.dylib';
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 on Darwin 1.3.x:
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 # cpp-precomp is problematic.
64 cppflags='-no-precomp';
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 # Case-insensitive filesystems don't get along with Makefile and
95 # makefile in the same place.  Since Darwin uses GNU make, this dodges
96 # the problem.
97 firstmakefile=GNUmakefile;