… | |
… | |
133 | print <<EOF; |
133 | print <<EOF; |
134 | |
134 | |
135 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
135 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
136 | |
136 | |
137 | |
137 | |
138 | Similarly to the epoll backend above, EV can take advantage of kqueue |
138 | Similarly to the epoll backend above, EV can take advantage of kqueue on |
139 | on many BSD systems (it seems to be broken on Mac OS X though, but what |
139 | many BSD systems. Support for kqueue will be detected at runtime, with a |
140 | isn't broken on that shoddy platform... ah yes, the cash gushing by apple, |
140 | safe fallback to other methods when it cannot be used. |
141 | selling defective software works perfectly there). Support for kqueue will |
|
|
142 | be detected at runtime, with a safe fallback to other methods when it |
|
|
143 | cannot be used. |
|
|
144 | |
141 | |
145 | EOF |
142 | Note 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 | |
|
|
145 | OS X: completely, utterly broken on at least <= 10.5. |
|
|
146 | FreeBSD: broken on at least <= 6.2-STABLE, |
|
|
147 | sockets and pipes *might* work, ptys definitely don't. |
|
|
148 | NetBSD: reports indicate that it likely WORKS. Yeah! :) |
|
|
149 | OpenBSD: reports indicate that it likely doesn't work |
|
|
150 | (similar problems as on FreeBSD). |
|
|
151 | |
|
|
152 | EOF |
|
|
153 | |
|
|
154 | my $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 | |
149 | print <<EOF; |
158 | print <<EOF; |
150 | |
159 | |
151 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
160 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
152 | |
161 | |
… | |
… | |
164 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
173 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
165 | |
174 | |
166 | |
175 | |
167 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
176 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
168 | you need some special libraries for this (such as -lrt and -lpthread). You |
177 | you need some special libraries for this (such as -lrt and -lpthread). You |
169 | can specify additional libraries to provide these calls now, or accept the |
178 | can specify additional libraries to provide these calls (and any other |
170 | default. |
179 | required by EV) now, or accept the default. |
171 | |
180 | |
172 | EOF |
181 | EOF |
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 | |
177 | print <<EOF; |
188 | print <<EOF; |
178 | |
189 | |
179 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
190 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |