-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
54 lines (45 loc) · 1.16 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id$
use 5.010000;
use ExtUtils::MakeMaker;
use Config;
use ExtUtils::Liblist;
# Check that OpenDKIM has been installed
my $libpath = ExtUtils::Liblist->ext('-lopendkim');
unless($libpath) {
my $found = 0;
foreach(split(/\s+/, $Config{libpth})) {
my $filename = "$_/libopendkim.$Config{so}";
if((-r $filename) && (-f $filename)) {
$found = 1;
last;
}
}
# TODO: Windows, etc
unless($found) {
die 'Please install libopendkim >= 2.5 from http://www.opendkim.org/';
}
# TODO: Check the installed version is >= 2.5
}
WriteMakefile(
NAME => 'Mail::OpenDKIM',
PREREQ_PM => {
'Error' => 0,
'Test::More' => 0.82, # Needs new_ok
'Carp' => 0,
},
VERSION_FROM => 'lib/Mail/OpenDKIM.pm',
AUTHOR => 'Vivek Khera <[email protected]>',
ABSTRACT => 'Provides an interface to OpenDKIM C library',
LIBS => ['-lopendkim'],
INC => '-I/usr/local/include',
OBJECT => '$(O_FILES)', # link all the C files too
LICENSE => 'perl',
OPTIMIZE => '-O0', # -O2 errors with perl 5.16, gcc 4.2.1, FreeBSD 9.1
);
sub MY::postamble {
return <<'MAKE_FRAG';
all :: README
README: lib/Mail/OpenDKIM.pm
pod2text $> > README
MAKE_FRAG
}