Skip to content

Commit

Permalink
build system (Perl bindings): Make Makefile.PL's PREFIX/INSTALL_BASE …
Browse files Browse the repository at this point in the history
…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 collectd#177 and collectd#196.

This is a follow-up / fix for 97e8f34.
  • Loading branch information
tokkee committed Nov 20, 2012
1 parent 82f22e2 commit 25fd246
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bindings/Makefile.am
Expand Up @@ -48,7 +48,7 @@ perl: buildperl/Makefile

buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
$(top_builddir)/config.status
cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(prefix) @PERL_BINDINGS_OPTIONS@
cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@

buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status

Expand Down
3 changes: 1 addition & 2 deletions configure.in
Expand Up @@ -5062,19 +5062,18 @@ 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"
then
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"
Expand Down

0 comments on commit 25fd246

Please sign in to comment.