--- EV/Makefile.PL 2007/11/01 15:46:43 1.12 +++ EV/Makefile.PL 2007/11/12 01:01:13 1.19 @@ -36,14 +36,12 @@ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** -POSIX optionally offers support for a monotonic clock source. EV can -take advantage of this clock source to detect time jumps reliably. This -will usually slow down EV a tiny amount, but this is usually -well-invested. Unfortunately, some systems are bound to be broken, so -you can disable this here. Whatever your reasons, you can completely -disable the detection and use of this monotonic clock by answering 'n' -here. Support for this clock type will otherwise be autodetected at both -compile- and runtime. +POSIX optionally offers support for a monotonic clock source. EV +can take advantage of this clock source to detect time jumps +reliably. Unfortunately, some systems are bound to be broken, so you can +disable this here: you can completely disable the detection and use of +the monotonic clock by answering 'n' here. Support for this clock type +will otherwise be autodetected at both compile- and runtime. EOF @@ -74,23 +72,64 @@ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** -EV needs the functions pthread_atfork and clock_gettime. On most systems -you need some special libraries for this (such as -lrt and -lpthread). You can -specify additional libraries to provide these calls now, or accept the default. +EV can use various backends with various portability issue. The select +backend is the most portable and makes for a good fallback, but it can be +limited to a low number of file descriptors and/or might not compile. If +you have problems with compiling ev_select., you might try to play around +with disabling it here, or forcing it to use the fd_set provided by your +OS, via the next question. I highly recommend keeping it in. EOF -$LIBS = prompt "Extra libraries for pthread_atfork and clock_gettime?", "-lpthread -lrt"; +if (prompt ("Enable select backend (y/n)?", "y") =~ /[yY]/) { + $DEFINE .= " -DEV_USE_SELECT"; + + print <; +*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** + +EOF WriteMakefile( dist => { @@ -119,7 +184,9 @@ SUFFIX => '.gz', }, depend => { - "EV.c" => "EV/EVAPI.h libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c", + "EV.c" => "EV/EVAPI.h " + . "libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c libev/ev_kqueue.c libev/ev_poll.c " + . "libev/event.h libev/event.c evdns.h evdns.c libev/ev_vars.h libev/ev_wrap.h", }, INC => "-Ilibev", DEFINE => "$DEFINE", @@ -128,7 +195,6 @@ VERSION_FROM => "EV.pm", PM => { 'EV.pm' => '$(INST_LIBDIR)/EV.pm', - 'EV/AnyEvent.pm' => '$(INST_LIBDIR)/EV/AnyEvent.pm', 'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm',