diff options
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index 55b79f0..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,52 +0,0 @@ -use ExtUtils::MakeMaker; -use Config; - -my @libs = (); -push @libs,'-lresolv' unless $Config{d_inetaton}; - -my $guess_cfg = { - 'freebsd' => { - 'defs' => '-D__USE_BSD', - }, - 'netbsd' => { - 'defs' => '-D__USE_BSD', - }, - 'openbsd' => { - 'defs' => '-D__USE_BSD', - } -}; - -my $guess = $guess_cfg->{$^O}; -unless (ref $guess eq 'HASH') { - $guess = {'defs' => ''}; -} - -WriteMakefile( - 'NAME' => 'IO::Interface', - 'VERSION_FROM' => 'Interface.pm', # finds $VERSION - 'LIBS' => ["@libs"], # e.g., '-lm' - 'INC' => '', # e.g., '-I/usr/include/other' - PMLIBDIRS => ['Interface'], - CONFIGURE => sub { - my %attrs; - $attrs{DEFINE} = $guess->{'defs'}; - - print "Checking for getifaddrs()..."; - eval { require 'ifaddrs.ph' }; - if ($@ && !-r "/usr/include/ifaddrs.h") { - print " Nope, will not use it.\n"; - } else { - $attrs{DEFINE} .= ' -DUSE_GETIFADDRS'; - print " Okay, I will use it.\n"; - } - print "Checking for sockaddr_dl..."; - if (!-r "/usr/include/net/if_dl.h") { - print " Nope, will not use it.\n"; - } else { - $attrs{DEFINE} .= ' -DHAVE_SOCKADDR_DL_STRUCT'; - print " Okay, I will use it.\n"; - } - - \%attrs; - }, -); |