|
|
1 | use 5.006; |
|
|
2 | |
|
|
3 | use Config; |
1 | use ExtUtils::MakeMaker; |
4 | use ExtUtils::MakeMaker; |
|
|
5 | |
|
|
6 | |
|
|
7 | unless (-e "libev/ev_epoll.c") { |
|
|
8 | print <<EOF; |
|
|
9 | |
|
|
10 | *** |
|
|
11 | *** ERROR: libev is missing or damaged. If you used a CVS check-out of EV, |
|
|
12 | *** you also have to check-out the "libev" module from the same CVS |
|
|
13 | *** repository into the EV dir (i.e. EV/libev from outside). |
|
|
14 | *** |
|
|
15 | |
|
|
16 | EOF |
|
|
17 | exit 1; |
|
|
18 | } |
|
|
19 | |
|
|
20 | #$ENV{CC} = $Config{cc}; |
|
|
21 | #$ENV{CFLAGS} = join " ", map $Config{$_}, qw(inc optimize ccflags cccdlflags); |
|
|
22 | #system "cd libevent && ./configure --disable-shared --enable-static --disable-maintainer-mode" |
|
|
23 | # and die "configure failed."; |
|
|
24 | |
|
|
25 | #$LIBS = qx<cd libevent && make printlibs>; |
2 | |
26 | |
3 | WriteMakefile( |
27 | WriteMakefile( |
4 | dist => { |
28 | dist => { |
5 | PREOP => 'pod2text Libevent.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
29 | PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
6 | COMPRESS => 'gzip -9v', |
30 | COMPRESS => 'gzip -9v', |
7 | SUFFIX => '.gz', |
31 | SUFFIX => '.gz', |
8 | }, |
32 | }, |
|
|
33 | depend => { |
|
|
34 | "EV.c" => "EV/EVAPI.h libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c", |
|
|
35 | }, |
|
|
36 | INC => "-Ilibev", |
9 | NAME => "Libevent", |
37 | NAME => "EV", |
|
|
38 | LIBS => ["-lrt -lpthread"], |
10 | VERSION_FROM => "Libevent.pm", |
39 | VERSION_FROM => "EV.pm", |
|
|
40 | PM => { |
|
|
41 | 'EV.pm' => '$(INST_LIBDIR)/EV.pm', |
|
|
42 | 'EV/AnyEvent.pm' => '$(INST_LIBDIR)/EV/AnyEvent.pm', |
|
|
43 | #'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', |
|
|
44 | 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', |
|
|
45 | 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', |
|
|
46 | 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', |
|
|
47 | }, |
11 | ); |
48 | ); |
12 | |
49 | |
|
|
50 | |