1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
|
|
2 | |
|
|
3 | use 5.008002; |
2 | |
4 | |
3 | unless (-e "Coro/libcoro/coro.c") { |
5 | unless (-e "Coro/libcoro/coro.c") { |
4 | print <<EOF; |
6 | print <<EOF; |
5 | |
7 | |
6 | *** |
8 | *** |
… | |
… | |
12 | EOF |
14 | EOF |
13 | exit 1; |
15 | exit 1; |
14 | } |
16 | } |
15 | |
17 | |
16 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
18 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
17 | |
|
|
18 | if ($] < 5.006) { |
|
|
19 | print <<EOF; |
|
|
20 | |
|
|
21 | *** |
|
|
22 | *** WARNING: This module is quite low-level and uses undocumented perl |
|
|
23 | *** internals to do it's job. While it seems to work fine with perl-5.[6-10] |
|
|
24 | *** it has not been tested with older versions. If it compiles and passes the |
|
|
25 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
|
|
26 | *** |
|
|
27 | *** Marc Lehmann <schmorp\@schmorp.de> |
|
|
28 | *** |
|
|
29 | |
|
|
30 | EOF |
|
|
31 | } |
|
|
32 | |
19 | |
33 | if (eval { require Event }) { |
20 | if (eval { require Event }) { |
34 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
21 | if ($Event::VERSION < 0.86 or $Event::VERSION == 0.88) { |
35 | print <<EOF |
22 | print <<EOF |
36 | |
23 | |
… | |
… | |
47 | $EVENT = 1; |
34 | $EVENT = 1; |
48 | $DEFINE .= " -DHAVE_EVENT=1"; |
35 | $DEFINE .= " -DHAVE_EVENT=1"; |
49 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
36 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
50 | } |
37 | } |
51 | } else { |
38 | } else { |
52 | print "\n*** Event not found, not build Event support.\n\n"; |
39 | print "\n*** Event not found, not building Event support.\n\n"; |
53 | } |
40 | } |
54 | |
41 | |
55 | if (eval { require EV }) { |
42 | if (eval { require EV }) { |
56 | if ($EV::VERSION < 3.3) { |
43 | if ($EV::VERSION < 3.3) { |
57 | print <<EOF |
44 | print <<EOF |
… | |
… | |
67 | $EV = 1; |
54 | $EV = 1; |
68 | $DEFINE .= " -DHAVE_EV=1"; |
55 | $DEFINE .= " -DHAVE_EV=1"; |
69 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
56 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
70 | } |
57 | } |
71 | } else { |
58 | } else { |
72 | print "\n*** EV not found, not build EV support.\n\n"; |
59 | print "\n*** EV not found, not building EV support.\n\n"; |
73 | } |
60 | } |
74 | |
61 | |
75 | WriteMakefile( |
62 | WriteMakefile( |
76 | dist => { |
63 | dist => { |
77 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
64 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
… | |
… | |
82 | VERSION_FROM => "Coro.pm", |
69 | VERSION_FROM => "Coro.pm", |
83 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
70 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
84 | PREREQ_PM => { |
71 | PREREQ_PM => { |
85 | common::sense => 0, |
72 | common::sense => 0, |
86 | Scalar::Util => 0.00, |
73 | Scalar::Util => 0.00, |
87 | AnyEvent => 4.800001, |
74 | AnyEvent => 5.0, |
88 | Storable => 2.15, |
75 | Storable => 2.15, |
89 | Time::HiRes => 0, |
76 | Time::HiRes => 0, |
90 | Guard => 0.5, |
77 | Guard => 0.5, |
91 | |
78 | |
92 | # for Coro::Event |
79 | # for Coro::Event |
… | |
… | |
95 | # for Coro::EV |
82 | # for Coro::EV |
96 | #EV => 3.3, |
83 | #EV => 3.3, |
97 | |
84 | |
98 | # for Coro::AIO |
85 | # for Coro::AIO |
99 | #IO::AIO => 2.3, |
86 | #IO::AIO => 2.3, |
100 | #AnyEvent::AIO => 1.0, |
87 | #AnyEvent::AIO => 1.1, |
101 | |
88 | |
102 | # for Coro::BDB |
89 | # for Coro::BDB |
103 | #BDB => 1.5, |
90 | #BDB => 1.5, |
104 | #AnyEvent::BDB => 1.0, |
91 | #AnyEvent::BDB => 1.0, |
105 | }, |
92 | }, |