1 | use 5.008002; |
|
|
2 | |
|
|
3 | use strict qw(vars subs); |
1 | use strict qw(vars subs); |
|
|
2 | use Canary::Stability EV => 1, 5.008002; |
4 | use Config; |
3 | use Config; |
5 | use ExtUtils::MakeMaker; |
4 | use ExtUtils::MakeMaker; |
6 | |
5 | |
7 | sub have_inc($) { |
6 | sub have_inc($) { |
8 | scalar grep -r "$_/$_[0]", $Config{usrinc}, split / /, $Config{incpth} |
7 | scalar grep -r "$_/$_[0]", $Config{usrinc}, split / /, $Config{incpth} |
9 | } |
8 | } |
|
|
9 | |
|
|
10 | my $DEFINE; |
10 | |
11 | |
11 | unless (-e "libev/ev_epoll.c") { |
12 | unless (-e "libev/ev_epoll.c") { |
12 | print <<EOF; |
13 | print <<EOF; |
13 | |
14 | |
14 | *** |
15 | *** |
… | |
… | |
48 | will otherwise be autodetected at both compile- and runtime. (this setting |
49 | will otherwise be autodetected at both compile- and runtime. (this setting |
49 | currently affects the use of nanosleep over select as well). |
50 | currently affects the use of nanosleep over select as well). |
50 | |
51 | |
51 | EOF |
52 | EOF |
52 | |
53 | |
53 | my $DEFINE .= " -DEV_USE_MONOTONIC=" . (0 + (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/)); |
54 | unless (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) { |
|
|
55 | $DEFINE .= " -DEV_USE_MONOTONIC=0"; |
|
|
56 | } |
54 | |
57 | |
55 | print <<EOF; |
58 | print <<EOF; |
56 | |
59 | |
57 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
60 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
58 | |
61 | |
… | |
… | |
294 | LIBS => [$LIBS], |
297 | LIBS => [$LIBS], |
295 | PREREQ_PM => { |
298 | PREREQ_PM => { |
296 | @anyevent, |
299 | @anyevent, |
297 | "common::sense" => 0, |
300 | "common::sense" => 0, |
298 | }, |
301 | }, |
|
|
302 | CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0 }, |
299 | VERSION_FROM => "EV.pm", |
303 | VERSION_FROM => "EV.pm", |
300 | PM => { |
304 | PM => { |
301 | 'EV.pm' => '$(INST_LIB)/EV.pm', |
305 | 'EV.pm' => '$(INST_LIB)/EV.pm', |
302 | 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', |
306 | 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', |
303 | 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', |
307 | 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', |