1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
|
|
2 | |
|
|
3 | unless (-e "Coro/libcoro/coro.c") { |
|
|
4 | print <<EOF; |
|
|
5 | |
|
|
6 | *** |
|
|
7 | *** ERROR: Coro/libcoro is missing or damaged. If you used a CVS check-out |
|
|
8 | *** of Coro, you also have to check-out the "libcoro" module from the same CVS |
|
|
9 | *** repository in the Coro subdirectory (i.e. Coro/Coro/libcoro from outside). |
|
|
10 | *** |
|
|
11 | |
|
|
12 | EOF |
|
|
13 | exit 1; |
|
|
14 | } |
|
|
15 | |
|
|
16 | print "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n\n"; |
2 | |
17 | |
3 | if ($] < 5.006) { |
18 | if ($] < 5.006) { |
4 | print <<EOF; |
19 | print <<EOF; |
5 | |
20 | |
6 | *** |
21 | *** |
7 | *** WARNING: This module is quite low-level and uses undocumented perl |
22 | *** 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] |
23 | *** 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 |
24 | *** 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 ;) |
25 | *** testsuite, it should work. Otherwise you should either upgrade or fix it ;) |
11 | *** |
26 | *** |
12 | *** Marc Lehmann <schmorp\@schmorp.de> |
27 | *** Marc Lehmann <schmorp\@schmorp.de> |
13 | *** |
28 | *** |
… | |
… | |
31 | } else { |
46 | } else { |
32 | $EVENT = 1; |
47 | $EVENT = 1; |
33 | $DEFINE .= " -DHAVE_EVENT=1"; |
48 | $DEFINE .= " -DHAVE_EVENT=1"; |
34 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
49 | print "\nEvent version $Event::VERSION found, building Event support.\n\n"; |
35 | } |
50 | } |
36 | print "\n"; |
|
|
37 | } else { |
51 | } else { |
38 | print "\n*** Event not found, not build Event support.\n\n"; |
52 | print "\n*** Event not found, not build Event support.\n\n"; |
|
|
53 | } |
|
|
54 | |
|
|
55 | if (eval { require EV }) { |
|
|
56 | $EV = 1; |
|
|
57 | $DEFINE .= " -DHAVE_EV=1"; |
|
|
58 | print "\nEV version $EV::VERSION found, building EV support.\n\n"; |
|
|
59 | } else { |
|
|
60 | print "\n*** EV not found, not build EV support.\n\n"; |
39 | } |
61 | } |
40 | |
62 | |
41 | WriteMakefile( |
63 | WriteMakefile( |
42 | dist => { |
64 | dist => { |
43 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
65 | PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
44 | COMPRESS => 'gzip -9v', |
66 | COMPRESS => 'gzip -9v', |
45 | SUFFIX => '.gz', |
67 | SUFFIX => '.gz', |
46 | }, |
68 | }, |
47 | NAME => "Coro", |
69 | NAME => "Coro", |
48 | VERSION_FROM => "Coro.pm", |
70 | VERSION_FROM => "Coro.pm", |
49 | DIR => ['Coro', ($EVENT ? 'Event' : ())], |
71 | DIR => ['Coro', ($EVENT ? 'Event' : ()), ($EV ? "EV" : ())], |
50 | PREREQ_PM => { |
72 | PREREQ_PM => { |
51 | Scalar::Util => 0.00, |
73 | Scalar::Util => 0.00, |
|
|
74 | AnyEvent => 2.51, |
|
|
75 | Storable => 2.15, |
|
|
76 | Time::HiRes => 0, |
52 | |
77 | |
53 | # for Coro::Event |
78 | # for Coro::Event |
54 | Event => 1.06, |
79 | Event => 1.06, |
55 | Time::HiRes => 0, |
|
|
56 | |
80 | |
|
|
81 | # for Coro::EV |
|
|
82 | EV => 0.03, |
|
|
83 | |
57 | # for Coro::AIO, Coro::Util |
84 | # for Coro::AIO |
58 | IO::AIO => 2.3, |
85 | IO::AIO => 2.3, |
59 | AnyEvent => 2.51, |
|
|
60 | }, |
86 | }, |
61 | PM => { |
87 | PM => { |
62 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
88 | 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm', |
63 | |
89 | |
64 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |
90 | 'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm', |