Commit | Line | Data |
---|---|---|
8f1f23e8 W |
1 | ## |
2 | # Rhapsody (Mac OS X Server) hints | |
835bc3f3 | 3 | # Wilfredo Sanchez <wsanchez@wsanchez.net> |
8f1f23e8 W |
4 | ## |
5 | ||
f556e5b9 JH |
6 | ## |
7 | # Paths | |
8 | ## | |
8f1f23e8 | 9 | |
835bc3f3 RGS |
10 | # Configure hasn't figured out the version number yet. Bummer. |
11 | perl_revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $src/patchlevel.h` | |
12 | perl_version=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h` | |
13 | perl_subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h` | |
14 | version="${perl_revision}.${perl_version}.${perl_subversion}" | |
15 | ||
f556e5b9 | 16 | # BSD paths |
e32f0149 | 17 | case "$prefix" in |
835bc3f3 RGS |
18 | '') |
19 | # Default install; use non-system directories | |
20 | prefix='/usr/local'; # Built-in perl uses /usr | |
21 | siteprefix='/usr/local'; | |
22 | vendorprefix='/usr'; usevendorprefix='define'; | |
23 | ||
24 | # Where to put modules. | |
25 | sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also | |
26 | vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules | |
27 | ;; | |
28 | ||
29 | '/usr') | |
30 | # We are building/replacing the built-in perl | |
31 | siteprefix='/usr/local'; | |
32 | vendorprefix='/usr/local'; usevendorprefix='define'; | |
33 | ||
34 | # Where to put modules. | |
35 | sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also | |
36 | vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules | |
37 | ;; | |
e32f0149 | 38 | esac |
f556e5b9 JH |
39 | |
40 | ## | |
41 | # Tool chain settings | |
42 | ## | |
43 | ||
44 | # Since we can build fat, the archname doesn't need the processor type | |
45 | archname='rhapsody'; | |
8f1f23e8 W |
46 | |
47 | # nm works. | |
48 | usenm='true'; | |
f556e5b9 JH |
49 | |
50 | # Libc is in libsystem. | |
51 | libc='/System/Library/Frameworks/System.framework/System'; | |
8f1f23e8 W |
52 | |
53 | # Optimize. | |
54 | optimize='-O3'; | |
55 | ||
835bc3f3 | 56 | # -fno-common because common symbols are not allowed in MH_DYLIB |
00e89ad4 | 57 | ccflags="${ccflags} -fno-common" |
8f1f23e8 | 58 | |
835bc3f3 RGS |
59 | # Unverified whether this is necessary on Rhapsody, but the test shouldn't hurt. |
60 | # At least on Darwin 1.3.x: | |
61 | # | |
62 | # # define INT32_MIN -2147483648 | |
63 | # int main () { | |
64 | # double a = INT32_MIN; | |
65 | # printf ("INT32_MIN=%g\n", a); | |
66 | # return 0; | |
67 | # } | |
68 | # will output: | |
69 | # INT32_MIN=2.14748e+09 | |
70 | # Note that the INT32_MIN has become positive. | |
71 | # INT32_MIN is set in /usr/include/stdint.h by: | |
72 | # #define INT32_MIN -2147483648 | |
73 | # which seems to break the gcc. Defining INT32_MIN as (-2147483647-1) | |
74 | # seems to work. INT64_MIN seems to be similarly broken. | |
75 | # -- Nicholas Clark, Ken Williams, and Edward Moy | |
76 | # | |
77 | case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in | |
78 | *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; | |
79 | esac | |
80 | ||
4e644a1e | 81 | # cpp-precomp is problematic. |
835bc3f3 RGS |
82 | cppflags='${cppflags} -traditional-cpp'; |
83 | ||
84 | # This is necessary because perl's build system doesn't | |
85 | # apply cppflags to cc compile lines as it should. | |
86 | ccflags="${ccflags} ${cppflags}" | |
4e644a1e | 87 | |
f556e5b9 JH |
88 | # Shared library extension is .dylib. |
89 | # Bundle extension is .bundle. | |
8f1f23e8 W |
90 | ld='cc'; |
91 | so='dylib'; | |
92 | dlext='bundle'; | |
f556e5b9 JH |
93 | dlsrc='dl_dyld.xs'; |
94 | usedl='define'; | |
8f1f23e8 W |
95 | cccdlflags=''; |
96 | lddlflags="${ldflags} -bundle -undefined suppress"; | |
f556e5b9 | 97 | ldlibpthname='DYLD_LIBRARY_PATH'; |
8f1f23e8 | 98 | useshrplib='true'; |
8f1f23e8 | 99 | |
f556e5b9 JH |
100 | ## |
101 | # System libraries | |
102 | ## | |
103 | ||
8f1f23e8 W |
104 | # vfork works |
105 | usevfork='true'; | |
106 | ||
ec5333ab JH |
107 | # our malloc works (but allow users to override) |
108 | case "$usemymalloc" in | |
109 | '') usemymalloc='n' ;; | |
110 | esac | |
5cf1d1f1 | 111 | |
835bc3f3 RGS |
112 | # |
113 | # The libraries are not threadsafe in Rhapsody | |
114 | # | |
115 | # Fix when Apple fixes libc. | |
116 | # | |
117 | case "$usethreads$useithreads" in | |
118 | *define*) | |
119 | cat <<EOM >&4 | |
120 | ||
121 | ||
122 | ||
123 | *** Warning, there might be problems with your libraries with | |
124 | *** regards to threading. The test ext/threads/t/libc.t is likely | |
125 | *** to fail. | |
126 | ||
127 | EOM | |
128 | ;; | |
129 | esac | |
130 | ||
131 | ## | |
132 | # Build process | |
133 | ## | |
134 | ||
4e644a1e W |
135 | # Case-insensitive filesystems don't get along with Makefile and |
136 | # makefile in the same place. Since Darwin uses GNU make, this dodges | |
137 | # the problem. | |
437cf188 | 138 | firstmakefile=GNUmakefile; |