… | |
… | |
113 | |
113 | |
114 | |
114 | |
115 | The second very portable backend is poll(2). It does not exist on windows |
115 | The second very portable backend is poll(2). It does not exist on windows |
116 | and various versions of Mac OS X (and on the other versions it simply |
116 | and various versions of Mac OS X (and on the other versions it simply |
117 | doesn't work), but works basically everywhere else. It is recommended to use |
117 | doesn't work), but works basically everywhere else. It is recommended to use |
118 | the default here unless you run into compile problems in ev_poll.c. |
118 | the default here unless you run into compilation problems in ev_poll.c. |
119 | |
119 | |
120 | EOF |
120 | EOF |
121 | |
121 | |
122 | $DEFINE .= " -DEV_USE_POLL=" . (0 + (prompt ("Enable poll backend (y/n)?", (have_inc "poll.h") ? "y" : "n") =~ /[yY]/)); |
122 | $DEFINE .= " -DEV_USE_POLL=" . (0 + (prompt ("Enable poll backend (y/n)?", (have_inc "poll.h") ? "y" : "n") =~ /[yY]/)); |
123 | |
123 | |
… | |
… | |
339 | print <<EOF; |
339 | print <<EOF; |
340 | |
340 | |
341 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
341 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
342 | |
342 | |
343 | |
343 | |
|
|
344 | Linux kernels can notify userspace about realtime clock timejumps |
|
|
345 | using timerfd. Libev by default will try to take advantage of this if |
|
|
346 | possible. You can completely disable the detection and use of timerfd for |
|
|
347 | this purpose by answering 'n' here. Support for timerfd will otherwise be |
|
|
348 | autodetected at both compile- and runtime. |
|
|
349 | |
|
|
350 | EOF |
|
|
351 | |
|
|
352 | unless (prompt ("Enable optional support for timerfd to detect timejumps (y/n)?", "y") =~ /[yY]/) { |
|
|
353 | $DEFINE .= " -DEV_USE_TIMERFD=0"; |
|
|
354 | } |
|
|
355 | |
|
|
356 | print <<EOF; |
|
|
357 | |
|
|
358 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
359 | |
|
|
360 | |
344 | Libev contains numerous internal assert() invocations to check for |
361 | Libev contains numerous internal assert() invocations to check for |
345 | consistency and user errors. These are normally enabled, but most |
362 | consistency and user errors. These are normally enabled, but most |
346 | perl builds disable this error reporting mechanism by default. You |
363 | perl builds disable this error reporting mechanism by default. You |
347 | can re-enable these asserts here. Enabling them might help you catch |
364 | can re-enable these asserts here. Enabling them might help you catch |
348 | programming bugs earlier, but might cause a small slowdown. Also, failures |
365 | programming bugs earlier, but might cause a small slowdown. Also, failures |
… | |
… | |
354 | |
371 | |
355 | EOF |
372 | EOF |
356 | |
373 | |
357 | my $enable_assertions = 0; |
374 | my $enable_assertions = 0; |
358 | $enable_assertions = 0 + (prompt ("Make sure assertions are enabled? (y/n)?", $enable_assertions ? "y" : "n") =~ /[yY]/); |
375 | $enable_assertions = 0 + (prompt ("Make sure assertions are enabled? (y/n)?", $enable_assertions ? "y" : "n") =~ /[yY]/); |
359 | $DEFINE .= " -DEV_ENABLE_ASERTIONS=1" if $enable_assertions; |
376 | $DEFINE .= " -DEV_ENABLE_ASSERTIONS=1" if $enable_assertions; |
360 | |
377 | |
361 | print <<EOF; |
378 | print <<EOF; |
362 | |
379 | |
363 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
380 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
364 | |
381 | |
365 | |
382 | |
366 | Very rarely, people want to tweak EV even more, e.g. to exclude |
383 | Very rarely, people want to tweak EV even more, e.g. to exclude |
367 | or include certain watcher types or backends. This can be done by adding |
384 | or include certain watcher types or backends. This can be done by adding |
368 | extra -D options here, or via the EV_EXTRA_DEFS environment variable. |
385 | extra -D options here, or via the EV_EXTRA_DEFS environment variable. |
369 | |
386 | |
370 | For example, if you run into compile problems because of missing memory |
387 | For example, if you run into compilation problems because of missing memory |
371 | fences (or you just want extra performance), you can tell EV to not support |
388 | fences (or you just want extra performance), you can tell EV to not support |
372 | smp and threads via -DEV_NO_THREADS. |
389 | smp and threads via -DEV_NO_THREADS. |
373 | |
390 | |
374 | Normal persons just press enter. |
391 | Most people would just press enter. |
375 | |
392 | |
376 | EOF |
393 | EOF |
377 | |
394 | |
378 | $DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}"; |
395 | $DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}"; |
379 | |
396 | |