… | |
… | |
182 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
182 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
183 | you need some special libraries for this (such as -lrt and -lpthread). You |
183 | you need some special libraries for this (such as -lrt and -lpthread). You |
184 | can specify additional libraries to provide these calls (and any other |
184 | can specify additional libraries to provide these calls (and any other |
185 | required by EV) now, or accept the default. |
185 | required by EV) now, or accept the default. |
186 | |
186 | |
|
|
187 | On GNU/Linux systems, EV uses the LSB 3.1 __register_atfork function |
|
|
188 | to avoid the dependency on libpthread, and directly uses the clock_gettime |
|
|
189 | syscall to avoid a dependency on librt. |
|
|
190 | |
187 | EOF |
191 | EOF |
188 | |
192 | |
189 | my $solaris_libs = $^O =~ /solaris/i ? "-lsocket -lnsl" : ""; |
193 | my $solaris_libs = $^O =~ /solaris/i ? "-lsocket -lnsl" : ""; |
190 | #my $librt = $^O =~ /linux/i ? "-lpthread" : "-lpthread -lrt"; |
194 | my $librt = $^O =~ /linux/i ? "" : "-lpthread -lrt"; |
191 | my $librt = "-lpthread -lrt"; |
195 | my $LIBS = exists $ENV{EV_LIBS} ? $ENV{EV_LIBS} : "$librt $solaris_libs"; |
192 | my $LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "$librt $solaris_libs"; |
196 | $LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", $LIBS; |
193 | |
197 | |
194 | |
198 | |
195 | print <<EOF; |
199 | print <<EOF; |
196 | |
200 | |
197 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
201 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
… | |
… | |
245 | |
249 | |
246 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
250 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
247 | |
251 | |
248 | |
252 | |
249 | Very rarely, people want to tweak EV even more, e.g. to exclude |
253 | Very rarely, people want to tweak EV even more, e.g. to exclude |
250 | or include certain watcher types or backends. This cna be done by adding |
254 | 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. |
255 | extra -D options here, or via the EV_EXTRA_DEFS environment variable. |
|
|
256 | |
|
|
257 | For example, if you run into compile problems because of missing memory |
|
|
258 | fences (or you just want extra performance), you can tell EV to not support |
|
|
259 | smp and threads via -DEV_NO_THREADS. |
|
|
260 | |
252 | Normal persons just press enter. |
261 | Normal persons just press enter. |
253 | |
262 | |
254 | EOF |
263 | EOF |
255 | |
264 | |
256 | $DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}"; |
265 | $DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}"; |