-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.PL
93 lines (75 loc) · 1.84 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# This -*- perl -*- script writes the Makefile for this package.
use strict;
require 5.004_05;
use ExtUtils::MakeMaker;
$| = 1;
my $missing_modules = 0;
my $version;
$version = 0.01;
print "Checking for File::FnMatch $version...";
eval "use File::FnMatch $version;";
if ($@) {
print " failed\n";
++$missing_modules;
print <<EOT;
$@
File::FnMatch is used to find Apache configuration files that match a glob.
EOT
} else {
print " ok\n";
}
$version = 0.82;
print "Checking for File::Spec $version...";
eval "use File::Spec $version;";
if ($@) {
print " failed\n";
++$missing_modules;
print <<EOT;
$@
File::Spec must be installed for Apache configuration file directives
that take file and directory path names to be parsed in an operating
system independent manner.
EOT
} else {
print " ok\n";
}
$version = 0.18;
print "Checking for Test::More $version...";
eval "use Test::More $version;";
if ($@) {
print " failed\n";
++$missing_modules;
print <<EOT;
$@
Test::More is used to test the package.
EOT
} else {
print " ok\n";
}
$version = 1.04;
print "Checking for Tree::DAG_Node $version...";
eval "use Tree::DAG_Node $version;";
if ($@) {
print " failed\n";
++$missing_modules;
print <<EOT;
$@
Tree::DAG_Node must be installed to set up a tree structure for the
Apache configuration files.
EOT
} else {
print " ok\n";
}
print <<EOT if $missing_modules;
The missing module can be obtained from CPAN. Visit
<URL:http://www.perl.com/CPAN/> to find a CPAN site near you.
EOT
WriteMakefile(
'NAME' => 'Apache::ConfigParser',
'VERSION_FROM' => 'lib/Apache/ConfigParser.pm', # finds $VERSION
'PREREQ_PM' => { 'File::FnMatch' => 0.01,
'Tree::DAG_Node' => 1.04 },
'dist' => { 'COMPRESS' => 'gzip -9',
'SUFFIX' => 'gz'
},
);