ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/Makefile.PL
(Generate patch)

Comparing EV/Makefile.PL (file contents):
Revision 1.55 by root, Sat Sep 6 18:42:18 2014 UTC vs.
Revision 1.58 by root, Sat Jun 22 15:50:36 2019 UTC

1use 5.008002;
2
3use strict qw(vars subs); 1use strict qw(vars subs);
2use Canary::Stability EV => 1, 5.008002;
4use Config; 3use Config;
5use ExtUtils::MakeMaker; 4use ExtUtils::MakeMaker;
6 5
7sub have_inc($) { 6sub 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
10my $DEFINE;
10 11
11unless (-e "libev/ev_epoll.c") { 12unless (-e "libev/ev_epoll.c") {
12 print <<EOF; 13 print <<EOF;
13 14
14*** 15***
48will otherwise be autodetected at both compile- and runtime. (this setting 49will otherwise be autodetected at both compile- and runtime. (this setting
49currently affects the use of nanosleep over select as well). 50currently affects the use of nanosleep over select as well).
50 51
51EOF 52EOF
52 53
53my $DEFINE .= " -DEV_USE_MONOTONIC=" . (0 + (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/)); 54unless (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) {
55 $DEFINE .= " -DEV_USE_MONOTONIC=0";
56}
54 57
55print <<EOF; 58print <<EOF;
56 59
57*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 60*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
58 61
134EOF 137EOF
135 138
136my $can_epoll = have_inc "sys/epoll.h"; 139my $can_epoll = have_inc "sys/epoll.h";
137$can_epoll = $ENV{EV_EPOLL} if exists $ENV{EV_EPOLL}; 140$can_epoll = $ENV{EV_EPOLL} if exists $ENV{EV_EPOLL};
138$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
143print <<EOF;
144
145*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
146
147
148Linux 4.18 introduced another event polling interface, this time using
149the Linux AIO API. While this API is far superior to epoll and almost
150rivals kqueue, it also suffers from the same issues as kqueue typically
151does: only a subset of file types are supported (as of 4.19, I have seen
152eventfd, pipes, sockets files and some devices, but no ttys). It also
153is subject arbitrary system-wide limits imposed on it. Therefore, this
154backend is not used by default, even when it is compiled in, and you have
155to request it explicitly, e.g. with LIBEV_FLAGS=64. If unsure, accept the
156default.
157
158EOF
159
160my $can_linuxaio = have_inc "linux/aio_abi.h";
161$can_linuxaio or die;
162$can_linuxaio = $ENV{EV_LINUXAIO} if exists $ENV{EV_LINUXAIO};
163$DEFINE .= " -DEV_USE_LINUXAIO=" . (0 + (prompt ("Enable linux aio backend (y/n)?", $can_linuxaio ? "y" : "n") =~ /[yY]/));
139 164
140print <<EOF; 165print <<EOF;
141 166
142*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 167*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
143 168
294 LIBS => [$LIBS], 319 LIBS => [$LIBS],
295 PREREQ_PM => { 320 PREREQ_PM => {
296 @anyevent, 321 @anyevent,
297 "common::sense" => 0, 322 "common::sense" => 0,
298 }, 323 },
324 CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0 },
299 VERSION_FROM => "EV.pm", 325 VERSION_FROM => "EV.pm",
300 PM => { 326 PM => {
301 'EV.pm' => '$(INST_LIB)/EV.pm', 327 'EV.pm' => '$(INST_LIB)/EV.pm',
302 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', 328 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h',
303 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', 329 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm',

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines