aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-04-24 23:38:40 +0000
committerRuss Allbery <rra@stanford.edu>2008-04-24 23:38:40 +0000
commit80f60cd0d95507d7571068093ab39ca90af2b99a (patch)
tree7ddea363c3dcee0fb98ce04380c0fdf7c7464672
parentb5401e44d7af09d31fd6c6388d986abbca7e279f (diff)
If prefix is not /usr or /usr/local, base the installation path on
$datadir.
-rw-r--r--perl/Makefile.PL.in15
1 files 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@') : ())
);