1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
|
|
2 | |
|
|
3 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
2 | |
4 | |
3 | if ($] < 5.006) { |
5 | if ($] < 5.006) { |
4 | print <<EOF; |
6 | print <<EOF; |
5 | |
7 | |
6 | *** |
8 | *** |
7 | *** WARNING: This module is quite low-level and uses undocumented perl |
9 | *** WARNING: This module is quite low-level and uses undocumented perl |
8 | *** internals to do it's job. While it seems to work fine with perl-5.[6-9] |
10 | *** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
9 | *** it has not been tested with older versions. If it compiles and passes the |
11 | *** it has not been tested with older versions. If it compiles and passes the |
10 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
12 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
11 | *** |
13 | *** |
12 | *** Marc Lehmann <schmorp\@schmorp.de> |
14 | *** Marc Lehmann <schmorp\@schmorp.de> |
13 | *** |
15 | *** |
… | |
… | |
31 | } else { |
33 | } else { |
32 | $EVENT = 1; |
34 | $EVENT = 1; |
33 | $DEFINE .= " -DHAVE_EVENT=1"; |
35 | $DEFINE .= " -DHAVE_EVENT=1"; |
34 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
36 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
35 | } |
37 | } |
36 | print "\n"; |
|
|
37 | } else { |
38 | } else { |
38 | print "\n*** Event not found, not build Event support.\n\n"; |
39 | print "\n*** Event not found, not build Event support.\n\n"; |
|
|
40 | } |
|
|
41 | |
|
|
42 | if (eval { require EV }) { |
|
|
43 | $EV = 1; |
|
|
44 | $DEFINE .= " -DHAVE_EV=1"; |
|
|
45 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
|
|
46 | } else { |
|
|
47 | print "\n*** EV not found, not build EV support.\n\n"; |
39 | } |
48 | } |
40 | |
49 | |
41 | WriteMakefile( |
50 | WriteMakefile( |
42 | dist => { |
51 | dist => { |
43 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
52 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
44 | COMPRESS => 'gzip -9v', |
53 | COMPRESS => 'gzip -9v', |
45 | SUFFIX => '.gz', |
54 | SUFFIX => '.gz', |
46 | }, |
55 | }, |
47 | NAME => "Coro", |
56 | NAME => "Coro", |
48 | VERSION_FROM => "Coro.pm", |
57 | VERSION_FROM => "Coro.pm", |
49 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
58 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
50 | PREREQ_PM => { |
59 | PREREQ_PM => { |
51 | Scalar::Util => 0.00, |
60 | Scalar::Util => 0.00, |
|
|
61 | AnyEvent => 2.51, |
|
|
62 | Storable => 2.15, |
|
|
63 | Time::HiRes => 0, |
52 | |
64 | |
53 | # for Coro::Event |
65 | # for Coro::Event |
54 | Event => 1.06, |
66 | Event => 1.06, |
55 | Time::HiRes => 0, |
|
|
56 | |
67 | |
|
|
68 | # for Coro::EV |
|
|
69 | EV => 0.03, |
|
|
70 | |
57 | # for Coro::AIO, Coro::Util |
71 | # for Coro::AIO |
58 | IO::AIO => 2.3, |
72 | IO::AIO => 2.3, |
59 | AnyEvent => 2.51, |
|
|
60 | }, |
73 | }, |
61 | PM => { |
74 | PM => { |
62 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
75 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
63 | |
76 | |
64 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
77 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |