Skip to content
Snippets Groups Projects
Commit 3e2e908e authored by lha's avatar lha
Browse files

use krb5-config

git-svn-id: svn://svn.it.su.se/Heimdal-Kadm5/trunk@6 453aeaa5-fa1e-0410-b91d-a05dbf4e1782
parent 9241b723
No related branches found
No related tags found
No related merge requests found
use ExtUtils::MakeMaker; use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence # $Id4
# the contents of the Makefile that is written.
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;
}
printf "cflags: $cflags\n";
printf "lflags: $lflags\n";
WriteMakefile( WriteMakefile(
'NAME' => 'Heimdal::Kadm5', 'NAME' => 'Heimdal::Kadm5',
'VERSION_FROM' => 'Kadm5.pm', # finds $VERSION 'VERSION_FROM' => 'Kadm5.pm',
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005 ($] >= 5.005 ?
(ABSTRACT_FROM => 'Kadm5.pm', # retrieve abstract from module (ABSTRACT_FROM => 'Kadm5.pm',
AUTHOR => 'A. U. Thor <a.u.thor@a.galaxy.far.far.away>') : ()), AUTHOR => 'A. U. Thor <a.u.thor@a.galaxy.far.far.away>') : ()),
'LIBS' => ['-lresolv -L/pkg/heimdal/default/lib -lkrb5 -lroken -lasn1 -lkadm5clnt'], # e.g., '-lm' 'LIBS' => [ $lflags ],
'INC' => '-I/pkg/heimdal/default/include', # e.g., '-I/usr/include/other' 'INC' => $cflags ,
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' 'DEFINE' => '',
# Insert -I. if you add *.h files later:
# 'OBJECT' => '$(O_FILES)', # link all the C files too
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment