2 # Darwin (Mac OS) hints
3 # Wilfredo Sanchez <wsanchez@mit.edu>
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';
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';
24 # We are building/replacing the built-in perl
25 siteprefix='/usr/local';
26 vendorprefix='/usr/local'; usevendorprefix='define';
28 # Where to put modules.
29 privlib='/System/Library/Perl';
30 sitelib='/Library/Perl';
31 vendorlib='/Network/Library/Perl';
35 # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
36 man1dir="${prefix}/share/man/man1";
37 man3dir="${prefix}/share/man/man3";
43 # Since we can build fat, the archname doesn't need the processor type
50 if [ "x$optimize" = 'x' ]; then
54 # -pipe: makes compilation go faster.
55 # -fno-common: we don't like commons. Common symbols are not allowed
56 # in MH_DYLIB binaries, which is what libperl.dylib is. You will fail
57 # to link without that option, unless you otherwise eliminate all commons
58 # by, for example, initializing all globals.
60 ccflags="${ccflags} -pipe -fno-common"
62 # At least on Darwin 1.3.x:
64 # # define INT32_MIN -2147483648
66 # double a = INT32_MIN;
67 # printf ("INT32_MIN=%g\n", a);
71 # INT32_MIN=2.14748e+09
72 # Note that the INT32_MIN has become positive.
73 # INT32_MIN is set in /usr/include/stdint.h by:
74 # #define INT32_MIN -2147483648
75 # which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
76 # seems to work. INT64_MIN seems to be similarly broken.
77 # -- Nicholas Clark, Ken Williams, and Edward Moy
79 ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN"
81 # cppflags='-traditional-cpp';
82 # avoid Apple's cpp precompiler, better for extensions
83 cppflags="${cppflags} -no-cpp-precomp"
84 # and ccflags needs them aswell since we don't use cpp directly
85 ccflags="${ccflags} -no-cpp-precomp"
87 # Known optimizer problems.
88 case "`cc -v 2>&1`" in
89 *"3.1 20020105"*) toke_cflags='optimize=""' ;;
92 # Shared library extension is .dylib.
93 # Bundle extension is .bundle.
97 dlsrc='dl_dyld.xs'; usedl='define';
98 cccdlflags=' '; # space, not empty, because otherwise we get -fpic
99 # ldflag: -flat_namespace is only available since OS X 10.1 (Darwin 1.4.1)
100 # - but not in 10.0.x (Darwin 1.3.x)
104 *) ldflags="${ldflags} -flat_namespace" ;;
106 lddlflags="${ldflags} -bundle -undefined suppress";
107 ldlibpthname='DYLD_LIBRARY_PATH';
124 # Locales aren't feeling well.
125 LC_ALL=C; export LC_ALL;
128 # Case-insensitive filesystems don't get along with Makefile and
129 # makefile in the same place. Since Darwin uses GNU make, this dodges
131 firstmakefile=GNUmakefile;
134 # The libraries are not threadsafe as of OS X 10.1.
136 # Fix when Apple fixes libc.
138 case "$usethreads$useithreads$use5005threads" in
142 *** Warning, there might be problems with your libraries with
143 *** regards to threading. The test ext/threads/t/libc.t is likely