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

Comparing EV/Makefile.PL (file contents):
Revision 1.22 by root, Sat Nov 17 01:41:33 2007 UTC vs.
Revision 1.23 by root, Thu Nov 22 04:52:24 2007 UTC

133print <<EOF; 133print <<EOF;
134 134
135*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 135*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
136 136
137 137
138Similarly to the epoll backend above, EV can take advantage of kqueue 138Similarly to the epoll backend above, EV can take advantage of kqueue on
139on many BSD systems (it seems to be broken on Mac OS X though, but what 139many BSD systems. Support for kqueue will be detected at runtime, with a
140isn't broken on that shoddy platform... ah yes, the cash gushing by apple, 140safe fallback to other methods when it cannot be used.
141selling defective software works perfectly there). Support for kqueue will
142be detected at runtime, with a safe fallback to other methods when it
143cannot be used.
144 141
145EOF 142Note that kqueue is broken on most operating systems, so it defaults to
143'n' on most platforms that claim to support it. Here is what we know:
146 144
145OS X: completely, utterly broken on at least <= 10.5.
146FreeBSD: broken on at least <= 6.2-STABLE,
147 sockets and pipes *might* work, ptys definitely don't.
148NetBSD: reports indicate that it likely WORKS. Yeah! :)
149OpenBSD: reports indicate that it likely doesn't work
150 (similar problems as on FreeBSD).
151
152EOF
153
154my $can_kqueue = $^O =~ /netbsd/i && -e "/usr/include/sys/event.h";
155
147$DEFINE .= " -DEV_USE_KQUEUE=" . (0 + (prompt ("Enable kqueue backend (y/n)?", (-e "/usr/include/sys/event.h") ? "y" : "n") =~ /[yY]/)); 156$DEFINE .= " -DEV_USE_KQUEUE=" . (0 + (prompt ("Enable kqueue backend (y/n)?", $can_kqueue ? "y" : "n") =~ /[yY]/));
148 157
149print <<EOF; 158print <<EOF;
150 159
151*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 160*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
152 161
164*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 173*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
165 174
166 175
167EV needs the functions pthread_atfork and clock_gettime. On most systems 176EV needs the functions pthread_atfork and clock_gettime. On most systems
168you need some special libraries for this (such as -lrt and -lpthread). You 177you need some special libraries for this (such as -lrt and -lpthread). You
169can specify additional libraries to provide these calls now, or accept the 178can specify additional libraries to provide these calls (and any other
170default. 179required by EV) now, or accept the default.
171 180
172EOF 181EOF
173 182
183$SOLARIS_LIBS = $^O =~ /solaris/ ? " -lsocket -lnsl" : "";
184
174$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt"; 185$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt$SOLARIS_LIBS";
175 186
176 187
177print <<EOF; 188print <<EOF;
178 189
179*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 190*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines