From: Sebastian Harl Date: Tue, 20 Nov 2012 13:44:43 +0000 (+0100) Subject: build system (Perl bindings): Make Makefile.PL's PREFIX/INSTALL_BASE optional. X-Git-Tag: collectd-5.2.2~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6c769cf76d74ac758252062668ff07037eb421f1;p=collectd.git build system (Perl bindings): Make Makefile.PL's PREFIX/INSTALL_BASE optional. Both options may cause problems: - PREFIX might clash with INSTALL_BASE being set in $PERL_MM_OPT. - INSTALL_BASE without any further options set will install into non-standard directories in many cases. Rather, use PREFIX=${prefix} as default but overwrite that if --with-perl-bindings=... has been used. Thanks to faxm0dem for reporting the INSTALL_BASE problems on IRC and bvarner and nirik for reporting this in GH #177 and #196. This is a follow-up / fix for 97e8f346a88eccf4d1608c21d5cc6ee9620c1c41. Fixes Github issue #290. Signed-off-by: Florian Forster --- diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 50cd727f..b2ee4c11 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -45,7 +45,7 @@ perl: buildperl/Makefile buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \ $(top_builddir)/config.status - cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(DESTDIR)$(prefix) @PERL_BINDINGS_OPTIONS@ + cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@ buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status diff --git a/configure.in b/configure.in index 4f96b150..a20a25f4 100644 --- a/configure.in +++ b/configure.in @@ -5084,6 +5084,7 @@ then fi dnl Perl bindings +PERL_BINDINGS_OPTIONS="PREFIX=${prefix}" AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" @@ -5091,12 +5092,10 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ PERL_BINDINGS_OPTIONS="$withval" with_perl_bindings="yes" else - PERL_BINDINGS_OPTIONS="" with_perl_bindings="$withval" fi ], [ - PERL_BINDINGS_OPTIONS="" if test -n "$perl_interpreter" then with_perl_bindings="yes"