Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 122 lines (92 sloc) 3.047 kB
455ad0f @gbarr Initial revision
gbarr authored
1 # The -*- perl -*- script writes the Makefile for perl-ldap
2bc8b3b Change XML::Parser to XML::SAX::Base
Chris Ridd authored
2 # $Id: Makefile.PL,v 1.11 2003/03/09 11:00:50 chrisridd Exp $
455ad0f @gbarr Initial revision
gbarr authored
3
4 use 5.004;
5 use ExtUtils::MakeMaker;
6 use Getopt::Std;
7 use Config;
8
9 #--- Configure ---
10
11 if (!getopts("hs") || $opt_h) {
12 die <<"EDQ";
13 Usage: perl $0 [-h] [-s] [ MAKEMAKER_ARGS ]
14 -h Display this message
15 -s Install scripts from bin directory
16 EDQ
17 }
18
19 #--- Distribution section ---
20
21 $DISTNAME = 'perl-ldap';
22 $VERSION_FROM = 'lib/Net/LDAP.pm';
23 $AUTHOR = 'Graham Barr <gbarr@pobox.com>';
24
25 ($ABSTRACT = <<"EDQ") =~ s/\n/\\n/g;
26 perl-ldap is a library of modules implementing an LDAP client. The aim
27 of the perl-ldap project is to implement a very portable LDAP client in
28 perl by relying on as little compiled code as possible.
29 EDQ
30
31 #--- Check for required modules ---
32
33 my $missing = 0;
34 $| = 1;
35
36 sub check_module {
37 my($module,$version) = @_;
38 print substr("$module ............................",0,30);
39 my $ok = eval {
40 my $file = $module;
41 $file =~ s#::#/#g;
42 require $file . ".pm";
43 $module->VERSION($version) if defined $version;
44 1;
45 };
46 $missing++ unless $ok;
bfdcd11 @gbarr Tweaks to dependcies of distdir
gbarr authored
47 $@ =~ s/^(Can't locate \S* in \@INC).*/$1/s;
455ad0f @gbarr Initial revision
gbarr authored
48 print $ok ? "ok\n" : "** FAILED **\n$@\n";
49 $ok;
50 }
51
d35350c @gbarr *** empty log message ***
gbarr authored
52 print "\nChecking for OPTIONAL modules\n\n";
455ad0f @gbarr Initial revision
gbarr authored
53
bfee17e @gbarr *** empty log message ***
gbarr authored
54 check_module('URI',1.08) && check_module('URI::ldap',1.10) or print <<"EDQ","\n";
5227f6f @gbarr *** empty log message ***
gbarr authored
55 The URI::ldap module is needed ONLY IF you want to parse LDAP URLs
455ad0f @gbarr Initial revision
gbarr authored
56 EDQ
57
58 check_module('Digest::MD5') or print <<"EDQ","\n";
5227f6f @gbarr *** empty log message ***
gbarr authored
59 The Digest::MD5 module is needed ONLY IF intend to use CRAM-MD5 SASL authentication
60 EDQ
61
b4e2fcb Specified minimum version of IO::Socket::SSL
Chris Ridd authored
62 check_module('IO::Socket::SSL',0.81) or print <<"EDQ","\n";
5227f6f @gbarr *** empty log message ***
gbarr authored
63 The IO::Socket::SSL module is needed ONLY IF you intend to use LDAPS
64 EDQ
65
2bc8b3b Change XML::Parser to XML::SAX::Base
Chris Ridd authored
66 check_module('XML::SAX::Base') or print <<"EDQ","\n";
67 The XML::SAX::Base module is needed ONLY IF you intend to read/write DSML files
455ad0f @gbarr Initial revision
gbarr authored
68 EDQ
69
727d858 @gbarr Add check for MIME::Base64
gbarr authored
70 check_module('MIME::Base64') or print <<"EDQ","\n";
71 The MIME::Base64 module is needed ONLY IF you intend to read/write LDIF files
72 EDQ
73
559989d @gbarr Change over to using Authen::SASL v2.00, which is now distributed
gbarr authored
74 check_module('Authen::SASL', 2.00) or print <<"EDQ","\n";
75 If you intend to use SASL authentication you need at least version 2.00
76 EDQ
77
455ad0f @gbarr Initial revision
gbarr authored
78 print "\n",<<"EDQ","\n" if $missing;
79 ****************************************************************************
d35350c @gbarr *** empty log message ***
gbarr authored
80 You are missing some modules that MAY be needed for some of the features
81 in perl-ldap to work correctly. Read the above messages and download
82 any required modules from http://www.perl.com/CPAN
455ad0f @gbarr Initial revision
gbarr authored
83 ****************************************************************************
84 EDQ
85
86 #--- Write the Makefile ---
87
88 my %PL_FILES = map { ($a = $_) =~ s/\.PL// ? ($_,$a) : () } glob('bin/*.PL');
89
90 my @ppd;
91
92 if ($] >= 5.00503) {
93 @ppd = (
745009b @gbarr *** empty log message ***
gbarr authored
94 AUTHOR => $AUTHOR,
95 ABSTRACT => $ABSTRACT,
455ad0f @gbarr Initial revision
gbarr authored
96 );
97 }
98
99 WriteMakefile(
100 VERSION_FROM => $VERSION_FROM,
101 NAME => $DISTNAME,
102 EXE_FILES => $opt_s ? [ values %PL_FILES ] : [],
103 PL_FILES => \%PL_FILES,
104 clean => {FILES => 'temp'},
d35350c @gbarr *** empty log message ***
gbarr authored
105 PREREQ_PM => { 'Convert::ASN1' => 0.07 },
455ad0f @gbarr Initial revision
gbarr authored
106 @ppd,
107 );
108
109 sub MY::postamble {
110
bfdcd11 @gbarr Tweaks to dependcies of distdir
gbarr authored
111 <<EOS;
455ad0f @gbarr Initial revision
gbarr authored
112
83a823c @gbarr Dont generate html docs when creating release dist
gbarr authored
113 run_mkmanf :
bfdcd11 @gbarr Tweaks to dependcies of distdir
gbarr authored
114 ./mkmanf
455ad0f @gbarr Initial revision
gbarr authored
115
83a823c @gbarr Dont generate html docs when creating release dist
gbarr authored
116 distdir : run_mkmanf
455ad0f @gbarr Initial revision
gbarr authored
117
bfdcd11 @gbarr Tweaks to dependcies of distdir
gbarr authored
118 EOS
455ad0f @gbarr Initial revision
gbarr authored
119
120 }
121
Something went wrong with that request. Please try again.