xref: /openbsd-src/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm (revision a0747c9f67a4ae71ccb71e62a28d1ea19e06a63c)
1package ExtUtils::MM_AIX;
2
3use strict;
4our $VERSION = '7.44';
5$VERSION =~ tr/_//d;
6
7use ExtUtils::MakeMaker::Config;
8require ExtUtils::MM_Unix;
9our @ISA = qw(ExtUtils::MM_Unix);
10
11=head1 NAME
12
13ExtUtils::MM_AIX - AIX specific subclass of ExtUtils::MM_Unix
14
15=head1 SYNOPSIS
16
17  Don't use this module directly.
18  Use ExtUtils::MM and let it choose.
19
20=head1 DESCRIPTION
21
22This is a subclass of L<ExtUtils::MM_Unix> which contains functionality for
23AIX.
24
25Unless otherwise stated it works just like ExtUtils::MM_Unix.
26
27=head2 Overridden methods
28
29=head3 dlsyms
30
31Define DL_FUNCS and DL_VARS and write the *.exp files.
32
33=cut
34
35sub dlsyms {
36    my($self,%attribs) = @_;
37    return '' unless $self->needs_linking;
38    join "\n", $self->xs_dlsyms_iterator(\%attribs);
39}
40
41=head3 xs_dlsyms_ext
42
43On AIX, is C<.exp>.
44
45=cut
46
47sub xs_dlsyms_ext {
48    '.exp';
49}
50
51sub xs_dlsyms_arg {
52    my($self, $file) = @_;
53    my $arg = qq{-bE:${file}};
54    $arg = '-Wl,'.$arg if $Config{lddlflags} =~ /-Wl,-bE:/;
55    return $arg;
56}
57
58sub init_others {
59    my $self = shift;
60    $self->SUPER::init_others;
61    # perl "hints" add -bE:$(BASEEXT).exp to LDDLFLAGS. strip that out
62    # so right value can be added by xs_make_dynamic_lib to work for XSMULTI
63    $self->{LDDLFLAGS} ||= $Config{lddlflags};
64    $self->{LDDLFLAGS} =~ s#(\s*)\S*\Q$(BASEEXT)\E\S*(\s*)#$1$2#;
65    return;
66}
67
68=head1 AUTHOR
69
70Michael G Schwern <schwern@pobox.com> with code from ExtUtils::MM_Unix
71
72=head1 SEE ALSO
73
74L<ExtUtils::MakeMaker>
75
76=cut
77
78
791;
80