File: Makefile.PL

package info (click to toggle)
libheimdal-kadm5-perl 0.08-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 268 kB
  • sloc: perl: 970; ansic: 496; makefile: 6
file content (36 lines) | stat: -rw-r--r-- 1,020 bytes parent folder | download
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
use ExtUtils::MakeMaker;
# $Id$

my $find_krb5_config;

my $lflags= '-L/pkg/heimdal/default/lib -lkrb5 -lroken -lasn1 -ldes -lkadm5clnt';
my $cflags= '-I/usr/heimdal/default/include' ;

my @args = ("krb5-config", "--version");
$find_krb5_config = system(@args);

if ($find_krb5_config eq 0) {
    $lflags = `krb5-config --libs kadm-client`;
    $cflags = `krb5-config --cflags kadm-client`;
    chomp $lflags;
    chomp $cflags;
}

# On Debian, krb5-config returns code to set an -rpath to the Heimdal library
# directory, but we don't want to encode that in the module.  Strip this out.
$lflags =~ s{-Wl,-rpath -Wl,\S+ }{};

printf "cflags: $cflags\n";
printf "lflags: $lflags\n";

WriteMakefile(
    'NAME'		=> 'Heimdal::Kadm5',
    'VERSION_FROM'	=> 'Kadm5.pm',
    'PREREQ_PM'		=> {}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?
      (ABSTRACT_FROM => 'Kadm5.pm',
       AUTHOR     => 'Leif Johansson <leifj@it.su.se>') : ()),
    'LIBS'      => [ $lflags ],
    'INC'       => $cflags ,
    'DEFINE'		=> '',
);