padsp: Move the padsp helper lib into a private library
authorMichael Biebl <biebl@debian.org>
Wed, 15 Feb 2012 20:59:17 +0000 (21:59 +0100)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 20 Feb 2012 09:09:52 +0000 (14:39 +0530)
libpulsedsp is only used as a LD_PRELOAD library
for the padsp wrapper. So no need to have it in
a public library

src/Makefile.am
src/utils/padsp.in [moved from src/utils/padsp with 95% similarity, mode: 0644]

index 229c792..fe7794b 100644 (file)
@@ -87,7 +87,7 @@ EXTRA_DIST = \
                daemon/esdcompat.in \
                daemon/start-pulseaudio-x11.in \
                daemon/start-pulseaudio-kde.in \
-               utils/padsp \
+               utils/padsp.in \
                utils/qpaeq \
                modules/module-defs.h.m4 \
                daemon/pulseaudio.desktop.in \
@@ -762,8 +762,17 @@ libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version
 ###################################
 
 if HAVE_OSS_WRAPPER
-lib_LTLIBRARIES += libpulsedsp.la
+pkglib_LTLIBRARIES += libpulsedsp.la
 bin_SCRIPTS += utils/padsp
+
+edit = @sed \
+       -e "s|@pkglibdir[@]|$(pkglibdir)|g"
+
+utils/padsp: utils/padsp.in
+       $(edit) $< >$@
+
+CLEANFILES += utils/padsp
+
 endif
 
 libpulsedsp_la_SOURCES = utils/padsp.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from src/utils/padsp
rename to src/utils/padsp.in
index 4fe175c..4ecce8c
@@ -76,9 +76,9 @@ done
 shift $(( $OPTIND - 1 ))
 
 if [ x"$LD_PRELOAD" = x ] ; then
-   LD_PRELOAD="libpulsedsp.so"
+   LD_PRELOAD="@pkglibdir@/libpulsedsp.so"
 else
-   LD_PRELOAD="$LD_PRELOAD libpulsedsp.so"
+   LD_PRELOAD="$LD_PRELOAD @pkglibdir@/libpulsedsp.so"
 fi
 
 export LD_PRELOAD