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

Comparing EV/Makefile.PL (file contents):
Revision 1.14 by root, Fri Nov 2 11:11:05 2007 UTC vs.
Revision 1.15 by root, Sun Nov 4 16:43:53 2007 UTC

70print <<EOF; 70print <<EOF;
71 71
72 72
73*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 73*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
74 74
75EV needs the functions pthread_atfork and clock_gettime. On most systems 75EV by default uses select, which makes it hard to write efficient servers,
76you 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
77specify 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.
78 82
79EOF 83EOF
80 84
81$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}
82 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-disabled") ? "y" : "n") =~ /[yY]/) {
104 $DEFINE .= " -DEV_USE_KQUEUE";
105}
83 106
84print <<EOF; 107print <<EOF;
85 108
86 109
87*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 110*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
88 111
89EV needs the functions pthread_atfork and clock_gettime. On most systems 112EV needs the functions pthread_atfork and clock_gettime. On most systems
90you 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
91specify additional libraries to provide these calls now, or accept the default. 114can specify additional libraries to provide these calls now, or accept the
115default.
92 116
93EOF 117EOF
94 118
95if (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";
96 $DEFINE .= " -DEV_USE_EPOLL"; 120
97}
98 121
99print <<EOF; 122print <<EOF;
100 123
101 124
102*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 125*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines