summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac9
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 6cabc93..87ba959 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -236,7 +236,7 @@ perl/blib/lib/Wallet/Config.pm: $(srcdir)/perl/lib/Wallet/Config.pm
$(INSTALL_DATA) $(srcdir)/tests/tap/perl/Test/RRA.pm perl/t/lib/Test/
$(INSTALL_DATA) $(srcdir)/tests/tap/perl/Test/RRA/Config.pm \
perl/t/lib/Test/RRA/
- cd perl && perl Build.PL $(WALLET_PERL_FLAGS)
+ cd perl && $(PERL) Build.PL $(WALLET_PERL_FLAGS)
cd perl && ./Build
# This is a really ugly hack to only honor prefix when running make install
diff --git a/configure.ac b/configure.ac
index 4f56eb0..350132a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,15 @@ AS_IF([test x"$REMCTLD" != x],
[AC_DEFINE_UNQUOTED([PATH_REMCTLD], ["$REMCTLD"],
[Define to the full path to remctld to run remctl tests.])])
+AC_ARG_VAR(PERL, [Path to the Perl binary])
+AC_PATH_PROG(PERL, perl)
+if test -z "$PERL"; then
+ AC_MSG_ERROR([Could not find Perl.])
+fi
+$PERL -e 'require 5.008;' || {
+ AC_MSG_ERROR([Perl 5.8 or better is required.])
+}
+
dnl Enable appropriate warnings.
AM_CONDITIONAL([WARNINGS_GCC], [test x"$GCC" = xyes && test x"$CLANG" != xyes])
AM_CONDITIONAL([WARNINGS_CLANG], [test x"$CLANG" = xyes])