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
|
# This -*- perl -*- script makes the Makefile
# $Id: Makefile.PL,v 1.4 1999/10/24 16:10:29 graaff Exp $
require 5.002;
use ExtUtils::MakeMaker;
# chk_version from GBARR's IO Makefile.PL
sub chk_version
{
my($pkg,$wanted,$msg) = @_;
$| = 1;
print "Checking for $pkg...";
eval { my $p; ($p = $pkg . ".pm") =~ s#::#/#g; require $p; };
my $vstr = ${"${pkg}::VERSION"} ? "found v" . ${"${pkg}::VERSION"}
: "not found";
my $vnum = ${"${pkg}::VERSION"} || 0;
print $vnum >= $wanted ? "ok\n" : " " . $vstr . "\n";
$vnum >= $wanted;
}
# Check for proper version of LWP
chk_version('LWP' => '5.02') or
die "*** Checkbot requires LWP 5.02 or later in order to work properly\n";
chk_version('URI' => '1.03') or
die "*** Checkbot requires URI 1.03 or later in order to work properly\n";
# FTP should have been checked by LWP, but check anyway
chk_version('Net::FTP' => '2.00') or
warn "*** Checkbot requires Net::FTP 2.00 or later to correctly check FTP URLs\n";
# Mail::Send is nice, but not really needed
chk_version('Mail::Send' => '1.03') or
warn "*** Mail::Send not found. You currently can not use the --mailto option\n of Checkbot. Mail::Send can be found in the MailTools package.\n";
# Write the Makefile
WriteMakefile(
NAME => "checkbot",
PL_FILES => { 'checkbot.pl' => 'checkbot' },
EXE_FILES => [ 'checkbot' ],
MAN3PODS => {},
PM => {},
VERSION_FROM => q(checkbot.pl),
dist => {COMPRESS => 'gzip',
SUFFIX => 'gz' },
);
|