File: Makefile.PL

package info (click to toggle)
libapache-authensmb 0.60-3
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 36 kB
  • ctags: 16
  • sloc: makefile: 58; perl: 57
file content (46 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (2)
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
use ExtUtils::MakeMaker;


# The following code to check the module and version number was borrowed
# from Graham Barr's perl-ldap module set.

my $missing = 0;
$| = 1;

sub check_module {
    my($module,$version) = @_;
    print substr("$module ............................",0,30);
    my $ok = eval {
	my $file = $module;
    $file =~ s#::#/#g;
	require $file . ".pm";
	$module->VERSION($version) if defined $version;
	1;
    };
    $missing++ unless $ok;
    print $ok ? "ok\n" : "** FAILED **\n$@\n";
    $ok;
}


print "Checking for installed modules\n\n";

check_module('Authen::Smb',0.9) or print <<"EOF","\n";
Authen::Smb version 0.9 or greater required.  All versions of Authen::Smb below 0.9
have possible buffer overflows in the underlying smbval library.
EOF

if ($missing) {
    print "\n",<<"EOF", "\n";
Please visit CPAN to obtain up to date version of the missing modules.
EOF
exit;
}



WriteMakefile(
    'NAME'	=> 'Apache::AuthenSmb',
    'VERSION_FROM' => 'AuthenSmb.pm', # finds $VERSION
    'dist' => {COMPRESS => 'gzip', SUFFIX => 'gz'}
);