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

Comparing EV/Makefile.PL (file contents):
Revision 1.47 by root, Mon Nov 22 06:28:26 2010 UTC vs.
Revision 1.54 by root, Tue Oct 22 10:43:05 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*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
237EOF 242EOF
238 243
239my $can_signalfd = -e "/usr/include/sys/signalfd.h"; 244my $can_signalfd = -e "/usr/include/sys/signalfd.h";
240$can_signalfd = $ENV{EV_SIGNALFD} if exists $ENV{EV_SIGNALFD}; 245$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]/)); 246$DEFINE .= " -DEV_USE_SIGNALFD=" . (0 + (prompt ("Enable linux signalfd support (y/n)?", $can_signalfd ? "y" : "n") =~ /[yY]/));
247
248print <<EOF;
249
250*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
251
252
253Very rarely, people want to tweak EV even more, e.g. to exclude
254or include certain watcher types or backends. This can be done by adding
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
261Normal persons just press enter.
262
263EOF
264
265$DEFINE .= " " . prompt "Any extra -D options?", "$ENV{EV_EXTRA_DEFS}";
242 266
243print <<EOF; 267print <<EOF;
244 268
245*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 269*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
246 270
268 @anyevent, 292 @anyevent,
269 "common::sense" => 0, 293 "common::sense" => 0,
270 }, 294 },
271 VERSION_FROM => "EV.pm", 295 VERSION_FROM => "EV.pm",
272 PM => { 296 PM => {
273 'EV.pm' => '$(INST_LIBDIR)/EV.pm', 297 'EV.pm' => '$(INST_LIB)/EV.pm',
274 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', 298 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h',
275 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', 299 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm',
276 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', 300 'libev/ev.h' => '$(INST_LIB)/EV/ev.h',
277 'libev/ev.pod' => '$(INST_LIBDIR)/EV/libev.pod', 301 'libev/ev.pod' => '$(INST_LIB)/EV/libev.pod',
278 }, 302 },
279 MAN3PODS => { 303 MAN3PODS => {
280 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)', 304 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)',
281 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)', 305 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)',
282 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)', 306 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)',

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines