summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@debian.org>2016-11-28 14:49:06 -0300
committerTanu Kaskinen <tanuk@iki.fi>2017-01-19 03:00:45 +0200
commit9ce55be61047d685ccd0a141decf823fa68c62df (patch)
tree001cd95ee7a023d7482134df9047f6bd0d36732b /src
parent4bc753238f5775c23e2abd337e6372cfb7411fb8 (diff)
padsp: allow overriding library install location
The current build script hardcodes the $pkglibdir in the padsp command. This works and is a reasonable default. However, distributions that know where they install, can override this path and thus make padsp work for any architecture that has the library installed by using the following configure argument: --with-pulsedsp-location='/usr/\\$$LIB/pulseaudio' This works because ld.so considers $LIB a variable that will expand to several location paths, depending on the architecture of the binary being executed. In debian, for example, this would work for libpulsedsp.so installed in /usr/lib/x86_64-linux-gnu/ for amd64 and /usr/lib/i386-linux-gnu/ for i386, with a single padsp command.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/utils/padsp.in4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 498a3867..55847280 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -923,7 +923,7 @@ padsplib_LTLIBRARIES = libpulsedsp.la
bin_SCRIPTS += padsp
edit = @SED@ \
- -e "s|@pkglibdir[@]|$(pkglibdir)|g"
+ -e 's|@PULSEDSP_LOCATION[@]|$(PULSEDSP_LOCATION)|g'
padsp: utils/padsp.in
$(edit) $< > $@
diff --git a/src/utils/padsp.in b/src/utils/padsp.in
index 3430a657..fea00d2a 100644
--- a/src/utils/padsp.in
+++ b/src/utils/padsp.in
@@ -74,9 +74,9 @@ done
shift $(( $OPTIND - 1 ))
if [ x"$LD_PRELOAD" = x ] ; then
- LD_PRELOAD="@pkglibdir@/libpulsedsp.so"
+ LD_PRELOAD="@PULSEDSP_LOCATION@/libpulsedsp.so"
else
- LD_PRELOAD="$LD_PRELOAD @pkglibdir@/libpulsedsp.so"
+ LD_PRELOAD="$LD_PRELOAD @PULSEDSP_LOCATION@/libpulsedsp.so"
fi
export LD_PRELOAD