1 |
root |
1.1 |
use ExtUtils::MakeMaker; |
2 |
|
|
|
3 |
|
|
use 5.006; |
4 |
|
|
|
5 |
root |
1.2 |
use Config; |
6 |
|
|
|
7 |
|
|
$DEFINE = ""; |
8 |
|
|
|
9 |
|
|
$DEFINE .= " -DHAVE_MMAP" if $Config{d_mmap} eq "define" && $Config{d_munmap} eq "define"; |
10 |
|
|
|
11 |
|
|
if ($^O =~ /windows/) { |
12 |
|
|
# nop, autodetected |
13 |
|
|
} elsif (-e "/usr/include/ucontext.h") { |
14 |
|
|
$DEFINE .= " -DHAVE_UCONTEXT_H"; # lame |
15 |
|
|
} else { |
16 |
|
|
$DEFINE .= " -DHAVE_SETJMP_H -DHAVE_SIGALTSTACK"; # well |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
print <<EOF; |
20 |
|
|
|
21 |
|
|
* |
22 |
|
|
* compile config: $DEFINE |
23 |
|
|
* |
24 |
|
|
* if Coro doesn't work on your platform, try to adjust \$DEFINE |
25 |
|
|
* in Coro/Makefile.PL: |
26 |
|
|
* |
27 |
|
|
* -DHAVE_UCONTEXT_H |
28 |
|
|
* for systems that have working ucontexts |
29 |
|
|
* (e.g. linux + glibc-2.2.3 and above) |
30 |
|
|
* (all modern unices) |
31 |
|
|
* |
32 |
|
|
* -DHAVE_SETJMP_H -DHAVE_SIGALTSTACK |
33 |
|
|
* for other systems |
34 |
|
|
* (e.g. linux + glibc below 2.2) |
35 |
|
|
* |
36 |
|
|
* and none for microsoft's platform. |
37 |
|
|
* |
38 |
|
|
|
39 |
|
|
EOF |
40 |
|
|
|
41 |
root |
1.1 |
WriteMakefile( |
42 |
root |
1.2 |
NAME => "Coro::State", |
43 |
|
|
VERSION_FROM => "State.pm", |
44 |
|
|
DEFINE => $DEFINE, |
45 |
|
|
DIR => [], |
46 |
root |
1.1 |
); |
47 |
root |
1.2 |
|
48 |
|
|
|
49 |
root |
1.1 |
|