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

Comparing EV/Makefile.PL (file contents):
Revision 1.13 by root, Thu Nov 1 17:45:30 2007 UTC vs.
Revision 1.16 by root, Tue Nov 6 17:20:42 2007 UTC

34print <<EOF; 34print <<EOF;
35 35
36 36
37*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 37*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
38 38
39POSIX optionally offers support for a monotonic clock source. EV can 39POSIX optionally offers support for a monotonic clock source. EV
40take advantage of this clock source to detect time jumps reliably. This 40can take advantage of this clock source to detect time jumps
41will usually slow down EV a tiny amount, but this is usually
42well-invested. Unfortunately, some systems are bound to be broken, so 41reliably. Unfortunately, some systems are bound to be broken, so you can
43you can disable this here. Whatever your reasons, you can completely 42disable this here: you can completely disable the detection and use of
44disable the detection and use of this monotonic clock by answering 'n' 43the monotonic clock by answering 'n' here. Support for this clock type
45here. Support for this clock type will otherwise be autodetected at both 44will otherwise be autodetected at both compile- and runtime.
46compile- and runtime.
47 45
48EOF 46EOF
49 47
50if (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) { 48if (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) {
51 $DEFINE .= " -DEV_USE_MONOTONIC"; 49 $DEFINE .= " -DEV_USE_MONOTONIC";
72print <<EOF; 70print <<EOF;
73 71
74 72
75*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 73*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
76 74
77EV needs the functions pthread_atfork and clock_gettime. On most systems 75EV by default uses select, which makes it hard to write efficient servers,
78you need some special libraries for this (such as -lrt and -lpthread). You can 76especially if the number of active conencitons is much lower than the open
79specify additional libraries to provide these calls now, or accept the default. 77ones. GNU/Linux systems have a more scalable method called "epoll", which
78EV can use. For this to work, both your kernel and glibc have to support
79epoll, but if you can compile it, the detection will be done at runtime,
80and EV will safely fall back to using select when epoll isn't available.
81If unsure, accept the default.
80 82
81EOF 83EOF
82 84
83$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt"; 85if (prompt ("Enable epoll backend (y/n)?", (-e "/usr/include/sys/epoll.h") ? "y" : "n") =~ /[yY]/) {
86 $DEFINE .= " -DEV_USE_EPOLL";
87}
84 88
89print <<EOF;
90
91
92*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
93
94Similarly to the epoll backend above, EV can take advantage of kqueue on
95many BSD systems (it seems to be broken on Mac OS X though). The kqueue
96backend has not been tested, however, so it is disabled by default. Please
97test (and preferably fix) the kqueue backend when you have a machine
98supporting it. Support for kqueue will be detected at runtime, with a
99safe fallback to other methods when it cannot be used.
100
101EOF
102
103if (prompt ("Enable kqueue backend (y/n)?", (-e "/usr/include/sys/event.h") ? "y" : "n") =~ /[yY]/) {
104 $DEFINE .= " -DEV_USE_KQUEUE";
105}
85 106
86print <<EOF; 107print <<EOF;
87 108
88 109
89*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 110*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
90 111
91EV needs the functions pthread_atfork and clock_gettime. On most systems 112EV needs the functions pthread_atfork and clock_gettime. On most systems
92you need some special libraries for this (such as -lrt and -lpthread). You can 113you need some special libraries for this (such as -lrt and -lpthread). You
93specify additional libraries to provide these calls now, or accept the default. 114can specify additional libraries to provide these calls now, or accept the
115default.
94 116
95EOF 117EOF
96 118
97if (prompt ("Enable epoll backend (y/n)?", (-e "/usr/include/sys/epoll.h") ? "y" : "n") =~ /[yY]/) { 119$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt";
98 $DEFINE .= " -DEV_USE_EPOLL"; 120
99}
100 121
101print <<EOF; 122print <<EOF;
102 123
103 124
104*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 125*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines