From 1507d1a055317c2d30e249bc793afc2030f10704 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Tue, 6 Dec 2011 15:57:20 +0000 Subject: [PATCH] Calculated the correct default value for pmdir based on the local Perl installation. --- NEWS | 1 + configure.ac | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 9a77e29..9e2bc34 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ News file for Stow. * Changes in version 2.1.1 ** Fixed bug where ./configure --with-pmdir=X was ineffectual. +** Calculated the correct default value for pmdir based on the local Perl installation. * Changes in version 2.1.0 ** Major refactoring of code into separate Stow and Stow::Util Perl modules. ** Added support for ignore list files. diff --git a/configure.ac b/configure.ac index b7006fd..6d63176 100644 --- a/configure.ac +++ b/configure.ac @@ -21,9 +21,11 @@ fi AC_ARG_WITH( pmdir, - [ --with-pmdir=DIR perl modules are in DIR [[LIBDIR/perl5]]], - [PMDIR=${withval}], [PMDIR=${libdir}/perl5] -) + [ --with-pmdir=DIR Perl modules are in DIR [[LIBDIR/perl5]]], + [PMDIR=${withval}], + [eval `$PERL -V:installsitelib -V:siteprefix` + PMDIR='${prefix}'/"${installsitelib#$siteprefix/}"]) +AC_CONFIG_COMMANDS_POST([eval echo "Perl modules will be installed to $PMDIR"]) AC_SUBST([PMDIR]) AC_CONFIG_FILES([Makefile])