… | |
… | |
34 | print <<EOF; |
34 | print <<EOF; |
35 | |
35 | |
36 | |
36 | |
37 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
37 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
38 | |
38 | |
39 | POSIX optionally offers support for a monotonic clock source. EV can |
39 | POSIX optionally offers support for a monotonic clock source. EV |
40 | take advantage of this clock source to detect time jumps reliably. This |
40 | can take advantage of this clock source to detect time jumps |
41 | will usually slow down EV a tiny amount, but this is usually |
|
|
42 | well-invested. Unfortunately, some systems are bound to be broken, so |
41 | reliably. Unfortunately, some systems are bound to be broken, so you can |
43 | you can disable this here. Whatever your reasons, you can completely |
42 | disable this here: you can completely disable the detection and use of |
44 | disable the detection and use of this monotonic clock by answering 'n' |
43 | the monotonic clock by answering 'n' here. Support for this clock type |
45 | here. Support for this clock type will otherwise be autodetected at both |
44 | will otherwise be autodetected at both compile- and runtime. |
46 | compile- and runtime. |
|
|
47 | |
45 | |
48 | EOF |
46 | EOF |
49 | |
47 | |
50 | if (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) { |
48 | if (prompt ("Enable optional support for CLOCK_MONOTONIC (y/n)?", "y") =~ /[yY]/) { |
51 | $DEFINE .= " -DEV_USE_MONOTONIC"; |
49 | $DEFINE .= " -DEV_USE_MONOTONIC"; |
… | |
… | |
103 | |
101 | |
104 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
102 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
105 | |
103 | |
106 | EOF |
104 | EOF |
107 | |
105 | |
108 | #$ENV{CC} = $Config{cc}; |
|
|
109 | #$ENV{CFLAGS} = join " ", map $Config{$_}, qw(inc optimize ccflags cccdlflags); |
|
|
110 | #system "cd libevent && ./configure --disable-shared --enable-static --disable-maintainer-mode" |
|
|
111 | # and die "configure failed."; |
|
|
112 | |
|
|
113 | #$LIBS = qx<cd libevent && make printlibs>; |
|
|
114 | |
|
|
115 | WriteMakefile( |
106 | WriteMakefile( |
116 | dist => { |
107 | dist => { |
117 | PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
108 | PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
118 | COMPRESS => 'gzip -9v', |
109 | COMPRESS => 'gzip -9v', |
119 | SUFFIX => '.gz', |
110 | SUFFIX => '.gz', |
120 | }, |
111 | }, |
121 | depend => { |
112 | depend => { |
|
|
113 | "EV.c" => "EV/EVAPI.h " |
122 | "EV.c" => "EV/EVAPI.h libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c", |
114 | . "libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c " |
|
|
115 | . "libev/event.h libev/event.c libev/evdns.h libev/evdns.c", |
123 | }, |
116 | }, |
124 | INC => "-Ilibev", |
117 | INC => "-Ilibev", |
125 | DEFINE => "$DEFINE", |
118 | DEFINE => "$DEFINE", |
126 | NAME => "EV", |
119 | NAME => "EV", |
127 | LIBS => [$LIBS], |
120 | LIBS => [$LIBS], |