From 80f60cd0d95507d7571068093ab39ca90af2b99a Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 24 Apr 2008 23:38:40 +0000 Subject: If prefix is not /usr or /usr/local, base the installation path on $datadir. --- perl/Makefile.PL.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in index be27bd2..9deae88 100644 --- a/perl/Makefile.PL.in +++ b/perl/Makefile.PL.in @@ -6,9 +6,16 @@ use ExtUtils::MakeMaker; my $version = '@PACKAGE_VERSION@'; $version =~ s/\.(\d)$/.0$1/; +# Set a prefix for ExtUtils::MakeMaker if we were given one for configure. +my $prefix = '@prefix@'; +my $datarootdir = '@datarootdir@'; +my $datadir = '@datadir@'; + WriteMakefile( - NAME => 'Wallet', - VERSION => $version, - ABSTRACT => 'Wallet: a secure credential management system', - AUTHOR => 'Russ Allbery (rra@stanford.edu)' + NAME => 'Wallet', + VERSION => $version, + ABSTRACT => 'Wallet: a secure credential management system', + AUTHOR => 'Russ Allbery (rra@stanford.edu)', + (($prefix ne '/usr' && $prefix ne '/usr/local') ? + (PREFIX => '@datadir@') : ()) ); -- cgit v1.2.3