| 1 |
root |
1.1 |
use ExtUtils::MakeMaker; |
| 2 |
|
|
use Coro::MakeMaker; |
| 3 |
|
|
|
| 4 |
root |
1.4 |
use Canary::Stability Coro::Multicore => 1, 5.008009; |
| 5 |
root |
1.1 |
|
| 6 |
|
|
if ($^O eq "MSWin32") { |
| 7 |
|
|
# configuration on windows is hardcoded - as always |
| 8 |
|
|
|
| 9 |
|
|
print STDERR <<EOF; |
| 10 |
|
|
|
| 11 |
|
|
*** |
| 12 |
|
|
*** Your platform is not standards compliant. To get this module working, you need to |
| 13 |
|
|
*** download and install win32 pthread (http://sourceware.org/pthreads-win32/) |
| 14 |
|
|
*** in /gtk/{lib,include} |
| 15 |
|
|
*** also, the windows SDK is expected to be installed in /sdk |
| 16 |
|
|
*** and visual C is expected to be installed in /vc98 |
| 17 |
|
|
*** |
| 18 |
|
|
*** Alternatively, set the INC and LIBS environment variables |
| 19 |
|
|
*** accordingly before running Makefile.PL, or you can |
| 20 |
|
|
*** pass INC and LIBS arguments to Makefile.PL itself. |
| 21 |
|
|
*** |
| 22 |
|
|
|
| 23 |
|
|
EOF |
| 24 |
|
|
|
| 25 |
|
|
if ($Config{cc} =~ /(?:^|\\|\/)gcc(?:|.*\.exe)$/) { |
| 26 |
|
|
$INC = "$ENV{INC} -I/gtk/include"; |
| 27 |
|
|
$LIBS = ["$ENV{LIBS} -L/gtk/lib -lpthreadGC2"]; |
| 28 |
|
|
} else { |
| 29 |
|
|
$INC = "$ENV{INC} -I/sdk/include -I/vc98/include -I/gtk/include"; |
| 30 |
|
|
$LIBS = ["$ENV{LIBS} -L/gtk/lib -lpthreadVC2"]; |
| 31 |
|
|
} |
| 32 |
|
|
|
| 33 |
|
|
} else { |
| 34 |
|
|
|
| 35 |
|
|
$INC = ""; |
| 36 |
|
|
$LIBS = ['-lpthread', '-lpthreads', '']; |
| 37 |
|
|
|
| 38 |
|
|
if ($^O =~ /bsd/i) { |
| 39 |
|
|
print <<EOF; |
| 40 |
|
|
|
| 41 |
|
|
If you have problems with deadlocks or crashes on your system, |
| 42 |
|
|
make sure your perl has been linked with -lpthread (you might try |
| 43 |
|
|
LD_PRELOAD=/path/to/libpthread.so as a workaround). Also, pthread support |
| 44 |
|
|
under many BSDs is not the best - before reporting a bug in this module, |
| 45 |
|
|
make sure it's not an OS bug. |
| 46 |
|
|
|
| 47 |
|
|
EOF |
| 48 |
|
|
} |
| 49 |
|
|
} |
| 50 |
|
|
|
| 51 |
|
|
if ($^O =~ /linux/ && $Config{usemymalloc} eq "y") { |
| 52 |
|
|
print <<EOF; |
| 53 |
|
|
|
| 54 |
|
|
*** |
| 55 |
|
|
*** WARNING: |
| 56 |
|
|
*** |
| 57 |
|
|
*** Your perl uses its own memory allocator (-Dusemymalloc=y), |
| 58 |
|
|
*** which is known not to be threadsafe on GNU/Linux and probably |
| 59 |
|
|
*** other platforms (even when not used concurrently, it trashes |
| 60 |
|
|
*** the data structures of the system malloc running concurrently), |
| 61 |
|
|
*** for perls up to 5.8.8 and possibly later versions. |
| 62 |
|
|
*** |
| 63 |
|
|
*** If you are unsure wether your perl has been fixed, your system |
| 64 |
|
|
*** is safe for other reasons, or you experience spurious segfaults, |
| 65 |
|
|
*** please compile your perl with -Dusemymalloc=n. |
| 66 |
|
|
*** |
| 67 |
|
|
|
| 68 |
|
|
EOF |
| 69 |
|
|
} |
| 70 |
|
|
|
| 71 |
|
|
WriteMakefile(Coro::MakeMaker::coro_args( |
| 72 |
|
|
dist => { |
| 73 |
|
|
PREOP => 'pod2text Multicore.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
| 74 |
|
|
COMPRESS => 'gzip -9v', |
| 75 |
|
|
SUFFIX => '.gz', |
| 76 |
|
|
}, |
| 77 |
|
|
NAME => "Coro::Multicore", |
| 78 |
|
|
VERSION_FROM => "Multicore.pm", |
| 79 |
root |
1.2 |
CONFIGURE_REQUIRES => { "ExtUtils::MakeMaker" => 6.52, "Canary::Stability" => 0, "Coro" => 6.44 }, |
| 80 |
root |
1.3 |
TEST_REQUIRES => { "Coro" => 6.44 }, |
| 81 |
root |
1.2 |
PREREQ_PM => { "Coro" => 6.44, "AnyEvent" => 7 }, |
| 82 |
root |
1.1 |
INC => $INC, |
| 83 |
|
|
LIBS => $LIBS, |
| 84 |
|
|
)); |
| 85 |
|
|
|