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} |
… | |
… | |
138 | EOF |
137 | EOF |
139 | |
138 | |
140 | my $can_epoll = have_inc "sys/epoll.h"; |
139 | my $can_epoll = have_inc "sys/epoll.h"; |
141 | $can_epoll = $ENV{EV_EPOLL} if exists $ENV{EV_EPOLL}; |
140 | $can_epoll = $ENV{EV_EPOLL} if exists $ENV{EV_EPOLL}; |
142 | $DEFINE .= " -DEV_USE_EPOLL=" . (0 + (prompt ("Enable epoll backend (y/n)?", $can_epoll ? "y" : "n") =~ /[yY]/)); |
141 | $DEFINE .= " -DEV_USE_EPOLL=" . (0 + (prompt ("Enable epoll backend (y/n)?", $can_epoll ? "y" : "n") =~ /[yY]/)); |
|
|
142 | |
|
|
143 | print <<EOF; |
|
|
144 | |
|
|
145 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
146 | |
|
|
147 | |
|
|
148 | Linux 4.18 introduced another event polling interface, this time using |
|
|
149 | the Linux AIO API. While this API is far superior to epoll and almost |
|
|
150 | rivals kqueue, it also suffers from the same issues as kqueue typically |
|
|
151 | does: only a subset of file types are supported (as of 4.19, I have seen |
|
|
152 | eventfd, pipes, sockets files and some devices, but no ttys). It also |
|
|
153 | is subject arbitrary system-wide limits imposed on it. Therefore, this |
|
|
154 | backend is not used by default, even when it is compiled in, and you have |
|
|
155 | to request it explicitly, e.g. with LIBEV_FLAGS=64. If unsure, accept the |
|
|
156 | default. |
|
|
157 | |
|
|
158 | EOF |
|
|
159 | |
|
|
160 | my $can_linuxaio = have_inc "linux/aio_abi.h"; |
|
|
161 | $can_linuxaio = $ENV{EV_LINUXAIO} if exists $ENV{EV_LINUXAIO}; |
|
|
162 | $DEFINE .= " -DEV_USE_LINUXAIO=" . (0 + (prompt ("Enable linux aio backend (y/n)?", $can_linuxaio ? "y" : "n") =~ /[yY]/)); |
143 | |
163 | |
144 | print <<EOF; |
164 | print <<EOF; |
145 | |
165 | |
146 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
166 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
147 | |
167 | |
… | |
… | |
298 | LIBS => [$LIBS], |
318 | LIBS => [$LIBS], |
299 | PREREQ_PM => { |
319 | PREREQ_PM => { |
300 | @anyevent, |
320 | @anyevent, |
301 | "common::sense" => 0, |
321 | "common::sense" => 0, |
302 | }, |
322 | }, |
|
|
323 | CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0 }, |
303 | VERSION_FROM => "EV.pm", |
324 | VERSION_FROM => "EV.pm", |
304 | PM => { |
325 | PM => { |
305 | 'EV.pm' => '$(INST_LIB)/EV.pm', |
326 | 'EV.pm' => '$(INST_LIB)/EV.pm', |
306 | 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', |
327 | 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', |
307 | 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', |
328 | 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', |