From 13b1511c5222b60d4df03423fdf936c01a0c34e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Michel=20Vourg=C3=A8re?= Date: Sun, 9 Aug 2015 03:34:28 +0200 Subject: [PATCH] Stop using rpath in binding if it's disabled --- bindings/Makefile.am | 9 +++++++-- configure.ac | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bindings/Makefile.am b/bindings/Makefile.am index c363cdaf..54f5c23b 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -9,6 +9,11 @@ endif SUBDIRS = $(SUB_tcl) $(SUB_lua) +if ENABLE_RPATH +PYTHON_RPATH=--rpath=$(libdir) +PERL_RPATH=RPATH=$(libdir) +endif + # the following files are not mentioned in any other Makefile EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \ perl-shared/ntmake-build perl-shared/MANIFEST perl-shared/README perl-shared/Makefile.PL perl-shared/RRDs.pm perl-shared/RRDs.ppd perl-shared/RRDs.xs perl-shared/t/base.t perl-shared/t/callback.t \ @@ -63,7 +68,7 @@ python: ABS_TOP_SRCDIR=${abs_top_srcdir} \ ABS_TOP_BUILDDIR=${abs_top_builddir} \ LD_RUN_PATH=$(libdir) \ - $(PYTHON) ${abs_srcdir}/$@/setup.py build_ext --rpath=$(libdir) \ + $(PYTHON) ${abs_srcdir}/$@/setup.py build_ext $(PYTHON_RPATH) \ && env \ ABS_TOP_SRCDIR=${abs_top_srcdir} \ ABS_TOP_BUILDDIR=${abs_top_builddir} \ @@ -95,7 +100,7 @@ perl-shared: ABS_TOP_SRCDIR=${abs_top_srcdir} \ ABS_TOP_BUILDDIR=${abs_top_builddir} \ ABS_SRCDIR=${abs_srcdir}/$@ \ - $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) RPATH=$(libdir) \ + $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) $(PERL_RPATH) \ && $(MAKE) ) -mkdir -p ${builddir}/perl-shared diff --git a/configure.ac b/configure.ac index e802dcf4..1a840378 100644 --- a/configure.ac +++ b/configure.ac @@ -628,6 +628,9 @@ AC_SUBST(ALL_LIBS) CONFIGURE_PART(Prep for Building Language Bindings) +dnl Allow "if enable_rpath" in Makefile.am +AM_CONDITIONAL(ENABLE_RPATH,[test "x$enable_rpath" = "xyes"]) + dnl Check for Perl and friends PATH=$PATH:/usr/perl5/bin export PATH -- 2.47.2