From 643f4cdf11d1b115f151a8bb29522e748798e5de Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 7 Oct 2016 12:19:52 -0400 Subject: [PATCH] Attempt to allow perl to be installed in non-standard locations Signed-off-by: Mike Rylander --- Makefile.am | 1 + configure.ac | 6 ++++++ src/perl/Makefile.am | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index ed59a61..385115d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,7 @@ export PID = @localstatedir@/run/opensrf export SOCK = @localstatedir@/lock/opensrf export LOG = @localstatedir@/log/opensrf export srcdir = @srcdir@ +export PERL_BASE = @PERL_BASE@ opensrfincludedir = @includedir@/opensrf AM_CFLAGS = $(DEF_CFLAGS) diff --git a/configure.ac b/configure.ac index dd5d3a7..76bc293 100644 --- a/configure.ac +++ b/configure.ac @@ -202,6 +202,12 @@ if ! test -d "$APR_HEADERS"; then fi AC_SUBST([APR_HEADERS]) +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]) + # The following Apache version detection code is adapted from # http://www.gnu.org/software/autoconf-archive/ax_prog_apache.html # licensed under version 2 of the GNU General Public License, or diff --git a/src/perl/Makefile.am b/src/perl/Makefile.am index 4f49264..f42e1c1 100644 --- a/src/perl/Makefile.am +++ b/src/perl/Makefile.am @@ -24,7 +24,7 @@ install: build-perl ./Build install build-perl: - 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; build-perl-fail: echo -- 2.11.0