1 |
root |
1.1 |
use ExtUtils::MakeMaker; |
2 |
|
|
|
3 |
|
|
use Config; |
4 |
|
|
|
5 |
root |
1.3 |
require "autoconf.pm"; |
6 |
|
|
|
7 |
root |
1.9 |
if ($^O =~ /win32/i or $^O =~ /mswin/) { |
8 |
|
|
|
9 |
|
|
# configuration on windows is hardcoded - as always |
10 |
|
|
|
11 |
|
|
die "your platform is not standards-compliant, you have to port this module first\n";#d# |
12 |
|
|
|
13 |
|
|
} else { |
14 |
|
|
|
15 |
|
|
if ($^O =~ /freebsd/i) { |
16 |
|
|
print <<EOF; |
17 |
root |
1.5 |
|
18 |
root |
1.8 |
This package seems to deadlock or otherwise misbehave under FreeBSD. As |
19 |
|
|
documentation on FreeBSD threading is sorely lacking and confusing, I'll |
20 |
|
|
just call FreeBSD broken with regards to threading. |
21 |
|
|
|
22 |
|
|
If you find out whats wrong, please tell me. |
23 |
|
|
|
24 |
|
|
Some people had luck with using OPTIMIZE=-O instead of -O2, so you might |
25 |
|
|
want to try that. |
26 |
root |
1.5 |
|
27 |
|
|
EOF |
28 |
root |
1.9 |
} |
29 |
|
|
|
30 |
|
|
autoconf::run_script() |
31 |
|
|
and die "\nconfigure failed, check it's output above and autoconf/config.log\n\n"; |
32 |
root |
1.5 |
} |
33 |
|
|
|
34 |
root |
1.10 |
if ($^O =~ /linux/ && $Config{usemymalloc} eq "y") { |
35 |
|
|
print <<EOF; |
36 |
|
|
|
37 |
|
|
*** |
38 |
|
|
*** WARNING: |
39 |
|
|
*** |
40 |
|
|
*** Your perl uses it's own memory allocator (-Dusemymalloc=y), |
41 |
|
|
*** which is known not to be threadsafe on GNU/Linux and probably |
42 |
|
|
*** other platforms (even when not used concurrently, it trashes |
43 |
|
|
*** the data structures of the system malloc running concurrently), |
44 |
|
|
*** for perls up to 5.8.8 and possibly later versions. |
45 |
|
|
*** |
46 |
|
|
*** If you are unsure wether your perl has been fixed, your system |
47 |
|
|
*** is safe for other reasons, or you experience spurious segfaults, |
48 |
|
|
*** please compile your perl with -Dusemymalloc=n. |
49 |
|
|
*** |
50 |
|
|
|
51 |
|
|
EOF |
52 |
|
|
} |
53 |
|
|
|
54 |
root |
1.1 |
my $mm = MM->new({ |
55 |
|
|
dist => { |
56 |
|
|
PREOP => 'pod2text AIO.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
57 |
|
|
COMPRESS => 'gzip -9v', |
58 |
|
|
SUFFIX => '.gz', |
59 |
|
|
}, |
60 |
|
|
NAME => "IO::AIO", |
61 |
|
|
VERSION_FROM => "AIO.pm", |
62 |
root |
1.2 |
LIBS => ['-lpthread -lrt', '-lpthread', '-lpthreads', ''], |
63 |
root |
1.11 |
PM => { |
64 |
root |
1.12 |
'AIO.pm' => '$(INST_LIBDIR)/AIO.pm', |
65 |
root |
1.11 |
}, |
66 |
root |
1.4 |
clean => { FILES => "autoconf/config.h autoconf/config.log autoconf/config.status" }, |
67 |
root |
1.1 |
}); |
68 |
|
|
|
69 |
|
|
$mm->flush; |
70 |
|
|
|