1# This -*- perl -*- script makes the Makefile 2 3BEGIN { require 5.008_001 } 4use ExtUtils::MakeMaker; 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 my $path (@inc) { 15 if ( -f $path . "/poll.h" ) { 16 $define .= "-DI_POLL "; 17 last; 18 } 19 } 20} 21 22#--- Write the Makefile 23 24WriteMakefile( 25 VERSION_FROM => "IO.pm", 26 NAME => "IO", 27 OBJECT => '$(O_FILES)', 28 ABSTRACT => 'Perl core IO modules', 29 AUTHOR => 'Perl5 Porters <perl5-porters@perl.org>', 30 PREREQ_PM => { 31 'Test::More' => 0, 32 'File::Temp' => '0.15', 33 }, 34 ( 35 $PERL_CORE 36 ? () 37 : ( 38 INSTALLDIRS => ( $] < 5.011 ? 'perl' : 'site' ), 39 clean => { FILES => 'typemap' }, 40 ) 41 ), 42 ( $define ? ( DEFINE => $define ) : () ), 43 ( ( ExtUtils::MakeMaker->VERSION() gt '6.30' ) ? ( 'LICENSE' => 'perl' ) : () ), 44 META_MERGE => { 45 resources => { 46 license => 'http://dev.perl.org/licenses/', 47 bugtracker => 'https://github.com/perl/perl5/issues', 48 repository => 'https://github.com/Perl/perl5/tree/blead/dist/IO', 49 MailingList => 'http://lists.perl.org/list/perl5-porters.html', 50 }, 51 }, 52); 53