| 1 |
use ExtUtils::MakeMaker; |
| 2 |
|
| 3 |
use Config; |
| 4 |
|
| 5 |
if ($^O =~ /win32/i or $^O =~ /mswin/) { |
| 6 |
|
| 7 |
# configuration on windows is hardcoded - as always |
| 8 |
|
| 9 |
warn "your platform is not standards-compliant, you have to port this module first\n"; |
| 10 |
warn "using some hardcoded config that will not work on your system\n"; |
| 11 |
warn "hint: edit the Makefile.PL\n\n"; |
| 12 |
|
| 13 |
$INC = "-I/Perl/lib/CORE -I/sdk/include -I/vc98/include -I/gtk/include -I/gtk/include/pango-1.0 -I/gtk/include/glib-2.0 -I/gtk/lib/glib-2.0/include/ -I/gtk/include/freetype2"; |
| 14 |
$LIBS = ["-L/gtk/lib -ldb45 -lpthreadVC2"]; |
| 15 |
} else { |
| 16 |
$INC = ""; |
| 17 |
$LIBS = ['-lpthread -ldb'], |
| 18 |
} |
| 19 |
|
| 20 |
if ($^O =~ /linux/ && $Config{usemymalloc} eq "y") { |
| 21 |
print <<EOF; |
| 22 |
|
| 23 |
*** |
| 24 |
*** WARNING: |
| 25 |
*** |
| 26 |
*** Your perl uses it's own memory allocator (-Dusemymalloc=y), |
| 27 |
*** which is known not to be threadsafe on GNU/Linux and probably |
| 28 |
*** other platforms (even when not used concurrently, it trashes |
| 29 |
*** the data structures of the system malloc running concurrently), |
| 30 |
*** for perls up to 5.8.8 and possibly later versions. |
| 31 |
*** |
| 32 |
*** If you are unsure wether your perl has been fixed, your system |
| 33 |
*** is safe for other reasons, or you experience spurious segfaults, |
| 34 |
*** please compile your perl with -Dusemymalloc=n. |
| 35 |
*** |
| 36 |
|
| 37 |
EOF |
| 38 |
} |
| 39 |
|
| 40 |
my $mm = MM->new({ |
| 41 |
dist => { |
| 42 |
PREOP => 'pod2text BDB.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
| 43 |
COMPRESS => 'gzip -9v', |
| 44 |
SUFFIX => '.gz', |
| 45 |
}, |
| 46 |
NAME => "BDB", |
| 47 |
VERSION_FROM => "BDB.pm", |
| 48 |
INC => $INC, |
| 49 |
LIBS => $LIBS, |
| 50 |
PM => { |
| 51 |
'BDB.pm' => '$(INST_LIBDIR)/BDB.pm', |
| 52 |
}, |
| 53 |
}); |
| 54 |
|
| 55 |
$mm->flush; |
| 56 |
|