… | |
… | |
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 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
… | |
… | |
288 | @anyevent, |
292 | @anyevent, |
289 | "common::sense" => 0, |
293 | "common::sense" => 0, |
290 | }, |
294 | }, |
291 | VERSION_FROM => "EV.pm", |
295 | VERSION_FROM => "EV.pm", |
292 | PM => { |
296 | PM => { |
293 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
297 | 'EV.pm' => '$(INST_LIB)/EV.pm', |
294 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |
298 | 'EV/EVAPI.h' => '$(INST_LIB)/EV/EVAPI.h', |
295 | 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', |
299 | 'EV/MakeMaker.pm' => '$(INST_LIB)/EV/MakeMaker.pm', |
296 | 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', |
300 | 'libev/ev.h' => '$(INST_LIB)/EV/ev.h', |
297 | 'libev/ev.pod' => '$(INST_LIBDIR)/EV/libev.pod', |
301 | 'libev/ev.pod' => '$(INST_LIB)/EV/libev.pod', |
298 | }, |
302 | }, |
299 | MAN3PODS => { |
303 | MAN3PODS => { |
300 | 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)', |
304 | 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)', |
301 | 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)', |
305 | 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)', |
302 | 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)', |
306 | 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)', |