-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
104 lines (95 loc) · 2.36 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
94
95
96
97
98
99
100
101
102
103
104
###############################################################################
#
# File: Makefile.PL
#
# Author: Damien S. Stuart
#
# Purpose: Makefile.PL for the Authen::Krb5::Simple module.
#
###############################################################################
#
#use lib qw(inc);
BEGIN {
die "You must install the Devel::CheckLib module to build Authen::Krb5::Simple\n"
unless(eval "require Devel::CheckLib");
}
use ExtUtils::MakeMaker;
my ($krb5_inc, $krb5_lib);
# Places we might find Kerberos5 libs.
#
my @krb_lib_dirs = qw(
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/usr/lib64/krb5
/usr/lib/krb5
/usr/local/lib64/krb5
/usr/local/lib/krb5
/usr/lib64/krb
/usr/lib/krb
/usr/local/lib64/krb
/usr/local/lib/krb
/opt/local/lib
/opt/local/lib64
/opt/local/lib/krb5
/opt/local/lib64/krb5
/opt/local/lib/krb
/opt/local/lib64/krb
/opt/local/krb/lib
/opt/local/krb5/lib
/opt/local/krb/lib64
/opt/local/krb5/lib64
/opt/krb5/lib64
/opt/krb5/lib
/opt/krb/lib64
/opt/krb/lib
/usr/heimdal/lib64
/usr/heimdal/lib
/usr/local/heimdal/lib64
/usr/local/heimdal/lib
/opt/local/heimdal/lib64
/opt/local/heimdal/lib
/opt/heimdal/lib64
/opt/heimdal/lib
);
# If the ENV vars are specified, use them.
#
if(exists($ENV{KRB5_INCLUDE})) {
$krb5_inc = "-I$ENV{KRB5_INCLUDE}";
}
if(exists($ENV{KRB5_LIB})) {
$krb5_lib = "-L$ENV{KRB5_LIB}";
unshift(@krb_lib_dirs, $ENV{KRB5_LIB});
}
# See if the needed libs are available. Take a shot at several "possible"
# locations for these libs.
#
Devel::CheckLib::check_lib_or_exit(
lib => [qw( krb5 )],
libpath => \@kr_lib_dirs
) unless($ENV{skip_lib_check});
# Write out the Makefile
#
WriteMakefile(
'NAME' => 'Authen::Krb5::Simple',
'VERSION_FROM' => 'lib/Authen/Krb5/Simple.pm',
'PREREQ_PM' => {
'Devel::CheckLib' => 0,
'Test::More' => 0,
},
($] >= 5.006
? (
ABSTRACT => 'Perl module that performs Kerberos 5 authentication',
AUTHOR => 'Damien S. Stuart <[email protected]>')
: ()
),
'BUILD_REQUIRES' => {
'Devel::CheckLib' => 0,
'Test::More' => 0,
},
'LIBS' => ["$krb5_lib -lkrb5"],
'DEFINE' => '',
'INC' => $krb5_inc,
);
###EOF###