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 <octo@collectd.org>
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
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"
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"