File: Makefile.PL

package info (click to toggle)
libauthen-krb5-simple-perl 0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 120 kB
  • sloc: perl: 153; makefile: 9
file content (82 lines) | stat: -rw-r--r-- 1,841 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
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
###############################################################################
#
# File:    Makefile.PL
#
# Author:  Damien S. Stuart
#
# Purpose: Makefile.PL for the Authen::Krb5::Simple module.
#
###############################################################################
#
use lib 'inc';
use 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/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/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.
#
assert_lib(
    lib     => [qw( krb5 )],
    libpath => \@krb_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'     => {
        'Test::More',
    },
    ($] >= 5.006
        ? (
            ABSTRACT   => 'Perl module that performs Kerberos 5 authentication',
            AUTHOR     => 'Damien S. Stuart <dstuart@dstuart.org>')
        : ()
    ),
    'LIBS'      => ["$krb5_lib -lkrb5"],
    'DEFINE'    => '',
    'INC'       => $krb5_inc,
);


###EOF###