1 | use ExtUtils::MakeMaker; |
1 | use ExtUtils::MakeMaker; |
2 | |
2 | |
3 | WriteMakefile( |
3 | use Config; |
|
|
4 | |
|
|
5 | print <<EOF; |
|
|
6 | |
|
|
7 | WARNING: This module is architecture-dependent and will not likely work |
|
|
8 | on lesser-used architectures (see Changes). If the module (esp. |
|
|
9 | aio_read and aio_write) doesn't work, please report this and I'll |
|
|
10 | fix it for you. I promise ;) |
|
|
11 | |
|
|
12 | EOF |
|
|
13 | |
|
|
14 | $Config{osvers} >= 2.4 or print <<EOF; |
|
|
15 | |
|
|
16 | WARNING: This module requires 64 bit file offset functionality only found |
|
|
17 | in linux-2.4 and later. You can still compile this module on |
|
|
18 | older linuxes, but it won't run. |
|
|
19 | |
|
|
20 | DEVELOPERS: It is not difficult to get rid of this limitation, ask me and |
|
|
21 | I'll tell you what you need to change (and test, so I can add it!). |
|
|
22 | |
|
|
23 | EOF |
|
|
24 | |
|
|
25 | my $mm = MM->new({ |
4 | dist => { |
26 | dist => { |
5 | PREOP => 'pod2text AIO.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
27 | PREOP => 'pod2text AIO.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
6 | COMPRESS => 'gzip -9v', |
28 | COMPRESS => 'gzip -9v', |
7 | SUFFIX => '.gz', |
29 | SUFFIX => '.gz', |
8 | }, |
30 | }, |
9 | NAME => "Linux::AIO", |
31 | NAME => "Linux::AIO", |
10 | VERSION_FROM => "AIO.pm", |
32 | VERSION_FROM => "AIO.pm", |
11 | ); |
33 | }); |
12 | |
34 | |
13 | sub MY::postamble { |
35 | sub MY::postamble { |
14 | <<EOF; |
36 | <<EOF; |
15 | |
37 | |
16 | # set \$VERSION in all modules |
38 | # set \$VERSION in all modules |
17 | setver: |
39 | setver: |
18 | \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm |
40 | \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm |
19 | |
41 | |
20 | EOF |
42 | EOF |
21 | } |
43 | } |
22 | |
44 | |
|
|
45 | # now get rid of -fpic, because gcc can't use syscall'ed closures |
|
|
46 | # from within pic code on x86. |
23 | |
47 | |
|
|
48 | use Config; |
|
|
49 | |
|
|
50 | if ($Config{cppsymbols} =~ /__i386=1/) { |
|
|
51 | for ($mm->{CCDLFLAGS}, $mm->{CCCDLFLAGS}, @{$mm->{RESULT}}) { |
|
|
52 | s/\B-f(pic|PIC)\b//g |
|
|
53 | } |
|
|
54 | |
|
|
55 | # Put -O at the front so as not to change any existing optimisation level |
|
|
56 | # Need optimization of some form turned on to inline syscall() so that it |
|
|
57 | # sets the local errno |
|
|
58 | $mm->{OPTIMIZE} = '-O ' . $mm->{OPTIMIZE}; |
|
|
59 | } |
|
|
60 | |
|
|
61 | $mm->flush; |
|
|
62 | |