This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump Safe's VERSION to 2.28
[perl5.git] / dist / IO / Makefile.PL
CommitLineData
eb1c4873
GB
1# This -*- perl -*- script makes the Makefile
2
3BEGIN { require 5.006_001 }
8add82fc 4use ExtUtils::MakeMaker;
eb1c4873
GB
5use Config qw(%Config);
6my $PERL_CORE = grep { $_ eq 'PERL_CORE=1' } @ARGV;
7
8#--- Attempt to find <poll.h>
9
10my $define = "";
11
12unless ($PERL_CORE or exists $Config{'i_poll'}) {
13 my @inc = split(/\s+/, join(" ", $Config{'usrinc'}, $Config{'incpth'}, $Config{'locincpth'}));
14 foreach $path (@inc) {
15 if (-f $path . "/poll.h") {
16 $define .= "-DI_POLL ";
17 last;
18 }
19 }
20}
21
22if ($] < 5.008 and !$PERL_CORE) {
23 open(FH,">typemap");
24 print FH "const char * T_PV\n";
25 close(FH);
26}
27
28#--- Write the Makefile
cf7fe8a2 29
8add82fc 30WriteMakefile(
eb1c4873
GB
31 VERSION_FROM => "IO.pm",
32 NAME => "IO",
33 OBJECT => '$(O_FILES)',
34 ABSTRACT => 'Perl core IO modules',
35 AUTHOR => 'Graham Barr <gbarr@cpan.org>',
36 ( $PERL_CORE
37 ? ()
38 : (
39 INSTALLDIRS => 'perl',
40 clean => {FILES => 'typemap'},
41 )
42 ),
43 ($define ? (DEFINE => $define) : ()),
44 ((ExtUtils::MakeMaker->VERSION() gt '6.30') ? ('LICENSE' => 'perl') : ()),
8add82fc 45);