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

Comparing EV/Makefile.PL (file contents):
Revision 1.49 by root, Thu Dec 30 07:37:38 2010 UTC vs.
Revision 1.53 by root, Tue Jan 15 21:49:38 2013 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines