… | |
… | |
185 | required by EV) now, or accept the default. |
185 | required by EV) now, or accept the default. |
186 | |
186 | |
187 | EOF |
187 | EOF |
188 | |
188 | |
189 | my $solaris_libs = $^O =~ /solaris/i ? "-lsocket -lnsl" : ""; |
189 | my $solaris_libs = $^O =~ /solaris/i ? "-lsocket -lnsl" : ""; |
190 | my $librt = $^O =~ /linux/i ? "-lpthread" : "-lpthread -lrt"; |
190 | #my $librt = $^O =~ /linux/i ? "-lpthread" : "-lpthread -lrt"; |
|
|
191 | my $librt = "-lpthread -lrt"; |
191 | my $LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "$librt $solaris_libs"; |
192 | my $LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "$librt $solaris_libs"; |
192 | |
193 | |
193 | |
194 | |
194 | print <<EOF; |
195 | print <<EOF; |
195 | |
196 | |
… | |
… | |
237 | EOF |
238 | EOF |
238 | |
239 | |
239 | my $can_signalfd = -e "/usr/include/sys/signalfd.h"; |
240 | my $can_signalfd = -e "/usr/include/sys/signalfd.h"; |
240 | $can_signalfd = $ENV{EV_SIGNALFD} if exists $ENV{EV_SIGNALFD}; |
241 | $can_signalfd = $ENV{EV_SIGNALFD} if exists $ENV{EV_SIGNALFD}; |
241 | $DEFINE .= " -DEV_USE_SIGNALFD=" . (0 + (prompt ("Enable linux signalfd support (y/n)?", $can_signalfd ? "y" : "n") =~ /[yY]/)); |
242 | $DEFINE .= " -DEV_USE_SIGNALFD=" . (0 + (prompt ("Enable linux signalfd support (y/n)?", $can_signalfd ? "y" : "n") =~ /[yY]/)); |
|
|
243 | |
|
|
244 | print <<EOF; |
|
|
245 | |
|
|
246 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
247 | |
|
|
248 | |
|
|
249 | Very rarely, people want to tweak EV even more, e.g. to exclude |
|
|
250 | or include certain watcher types or backends. This can be done by adding |
|
|
251 | extra -D options here, or via the EV_EXTRA_DEFS environment variable. |
|
|
252 | |
|
|
253 | For example, if you run into compile problems because of missing memory |
|
|
254 | fences (or you just want extra performance), you can tell EV to not support |
|
|
255 | smp and threads via -DEV_NO_THREADS. |
|
|
256 | |
|
|
257 | Normal persons just press enter. |
|
|
258 | |
|
|
259 | EOF |
|
|
260 | |
|
|
261 | $DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}"; |
242 | |
262 | |
243 | print <<EOF; |
263 | print <<EOF; |
244 | |
264 | |
245 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
265 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
246 | |
266 | |