Subject: | Intel Mac Support |
I have been using Math::Cephes on a PPC Mac and x86 Linux box to date but recently tried to
work with it on an Intel Mac and ran into issues. I found that I could get everything up and
running with some modification to the Makefile.PL. I made my changes so that building for
both architectures will work properly and attached a patch of the changes.
I'm using POSIX::uname to get the machine type. It would seem this method would/should be
used with other UNIX platforms, for instance Solaris on x86 and Linux on PPC but I am not
able to test those here.
Subject: | Intel-Mac-Makefile.patch |
--- Makefile.PL 2007-03-26 23:43:50.000000000 -0400
+++ Makefile_new.PL 2007-03-26 23:42:24.000000000 -0400
@@ -72,9 +72,15 @@
$defs{UNK} = 1;
}
elsif ($is_dar) {
+ require POSIX;
+ my $machine = (POSIX::uname())[4];
+ if ($machine eq 'i386') {
+ $defs{IBMPC} = 1;
+ } else {
$defs{WORDS_BIGENDIAN} = 1;
$defs{FLOAT_WORDS_BIGENDIAN} = 1;
$defs{MIEEE} = 1;
+ }
}
elsif ($is_vms) {
$defs{DEC} = 1;