1 | use 5.006; |
1 | use 5.006; |
2 | |
2 | |
3 | use Config; |
3 | use Config; |
4 | use ExtUtils::MakeMaker; |
4 | use ExtUtils::MakeMaker; |
5 | |
|
|
6 | |
5 | |
7 | unless (-e "libev/ev_epoll.c") { |
6 | unless (-e "libev/ev_epoll.c") { |
8 | print <<EOF; |
7 | print <<EOF; |
9 | |
8 | |
10 | *** |
9 | *** |
… | |
… | |
158 | print <<EOF; |
157 | print <<EOF; |
159 | |
158 | |
160 | |
159 | |
161 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
160 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
162 | |
161 | |
|
|
162 | Similarly to the kqueue backend above, EV can take advantage of the |
|
|
163 | solaris 10 port interface. Support for port will be detected at runtime, |
|
|
164 | with a safe fallback to other methods when it cannot be used. |
|
|
165 | |
|
|
166 | EOF |
|
|
167 | |
|
|
168 | if (prompt ("Enable port backend (y/n)?", (-e "/usr/include/sys/port.h") ? "y" : "n") =~ /[yY]/) { |
|
|
169 | $DEFINE .= " -DEV_USE_PORT"; |
|
|
170 | } |
|
|
171 | |
|
|
172 | print <<EOF; |
|
|
173 | |
|
|
174 | |
|
|
175 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
|
|
176 | |
163 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
177 | EV needs the functions pthread_atfork and clock_gettime. On most systems |
164 | you need some special libraries for this (such as -lrt and -lpthread). You |
178 | you need some special libraries for this (such as -lrt and -lpthread). You |
165 | can specify additional libraries to provide these calls now, or accept the |
179 | can specify additional libraries to provide these calls now, or accept the |
166 | default. |
180 | default. |
167 | |
181 | |
… | |
… | |
174 | |
188 | |
175 | |
189 | |
176 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
190 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
177 | |
191 | |
178 | EOF |
192 | EOF |
|
|
193 | |
|
|
194 | my @anyevent = eval { require AnyEvent; $AnyEvent::VERSION < 2.6 } ? (AnyEvent => 2.6) : (); |
179 | |
195 | |
180 | WriteMakefile( |
196 | WriteMakefile( |
181 | dist => { |
197 | dist => { |
182 | PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
198 | PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
183 | COMPRESS => 'gzip -9v', |
199 | COMPRESS => 'gzip -9v', |
… | |
… | |
190 | }, |
206 | }, |
191 | INC => "-Ilibev", |
207 | INC => "-Ilibev", |
192 | DEFINE => "$DEFINE", |
208 | DEFINE => "$DEFINE", |
193 | NAME => "EV", |
209 | NAME => "EV", |
194 | LIBS => [$LIBS], |
210 | LIBS => [$LIBS], |
|
|
211 | PREREQ_PM => { |
|
|
212 | @anyevent, |
|
|
213 | }, |
195 | VERSION_FROM => "EV.pm", |
214 | VERSION_FROM => "EV.pm", |
196 | PM => { |
215 | PM => { |
197 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
216 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
198 | 'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', |
217 | 'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', |
199 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |
218 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |