From 79c4bd6395b13b6aa81255eb755dfb8ff4e3211a Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 17 Aug 2016 13:25:35 -0400 Subject: [PATCH] Attempt to allow perl to be installed in non-standard locations Signed-off-by: Mike Rylander --- Makefile.am | 1 + Open-ILS/src/perlmods/Makefile.am | 2 +- configure.ac | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 51b512c8f7..e11134c790 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ export REPORTERDIR=@localstatedir@/reporter export SOCK=@localstatedir@/lock export PID=@localstatedir@/run export LOG=@localstatedir@/log +export PERL_BASE=@PERL_BASE@ diff --git a/Open-ILS/src/perlmods/Makefile.am b/Open-ILS/src/perlmods/Makefile.am index b4431101ff..ea27663717 100644 --- a/Open-ILS/src/perlmods/Makefile.am +++ b/Open-ILS/src/perlmods/Makefile.am @@ -32,7 +32,7 @@ install: build-perl ./Build install build-perl: lib/OpenILS/Utils/Cronscript.pm - perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail + @if [ "${PERL_BASE}" = 'x' ]; then perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail; else perl Build.PL --install_base ${PERL_BASE} --destdir $(DESTDIR) || make -s build-perl-fail; fi; lib/OpenILS/Utils/Cronscript.pm: Makefile lib/OpenILS/Utils/Cronscript.pm.in $(do_subst) lib/OpenILS/Utils/Cronscript.pm.in > "$@" diff --git a/configure.ac b/configure.ac index 74e6b3b885..d49a437472 100644 --- a/configure.ac +++ b/configure.ac @@ -218,6 +218,12 @@ AC_ARG_WITH([dbi], [DBI_LIBS=${withval}], [DBI_LIBS=/usr/lib/x86_64-linux-gnu/dbd/]) +AC_ARG_WITH([perlbase], +[ --with-perlbase=path base location to install Perl modules (default based on Config.pm)], +[PERL_BASE=${withval}], +[PERL_BASE=x]) +AC_SUBST([PERL_BASE]) + # If the passed in value doesn't work, fall back to reasonable defaults # Distributions are starting to package a good version of libdbi / libdbd if ! test -d "$DBI_LIBS"; then -- 2.11.0