1package ExtUtils::MM_Darwin;
2
3use strict;
4use warnings;
5
6BEGIN {
7    require ExtUtils::MM_Unix;
8    our @ISA = qw( ExtUtils::MM_Unix );
9}
10
11our $VERSION = '7.62';
12$VERSION =~ tr/_//d;
13
14
15=head1 NAME
16
17ExtUtils::MM_Darwin - special behaviors for OS X
18
19=head1 SYNOPSIS
20
21    For internal MakeMaker use only
22
23=head1 DESCRIPTION
24
25See L<ExtUtils::MM_Unix> or L<ExtUtils::MM_Any> for documentation on the
26methods overridden here.
27
28=head2 Overridden Methods
29
30=head3 init_dist
31
32Turn off Apple tar's tendency to copy resource forks as "._foo" files.
33
34=cut
35
36sub init_dist {
37    my $self = shift;
38
39    # Thank you, Apple, for breaking tar and then breaking the work around.
40    # 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE while 10.5 wants
41    # COPYFILE_DISABLE.  I'm not going to push my luck and instead just
42    # set both.
43    $self->{TAR} ||=
44        'COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar';
45
46    $self->SUPER::init_dist(@_);
47}
48
49=head3 cflags
50
51Over-ride Apple's automatic setting of -Werror
52
53=cut
54
55sub cflags {
56    my($self,$libperl)=@_;
57    return $self->{CFLAGS} if $self->{CFLAGS};
58    return '' unless $self->needs_linking();
59
60    my $base = $self->SUPER::cflags($libperl);
61
62    foreach (split /\n/, $base) {
63        /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
64    };
65    $self->{CCFLAGS} .= " -Wno-error=implicit-function-declaration";
66
67    return $self->{CFLAGS} = qq{
68CCFLAGS = $self->{CCFLAGS}
69OPTIMIZE = $self->{OPTIMIZE}
70PERLTYPE = $self->{PERLTYPE}
71};
72}
73
741;
75