From 25fd24689c4c35409f68daf5587a67a247fc1446 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 20 Nov 2012 14:44:43 +0100 Subject: [PATCH] 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. --- bindings/Makefile.am | 2 +- configure.in | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 3876cc2c06..6d1411dba9 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -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 diff --git a/configure.in b/configure.in index 98395ed142..5345a1d399 100644 --- a/configure.in +++ b/configure.in @@ -5062,6 +5062,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" @@ -5069,12 +5070,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"