diff --git a/configure.ac b/configure.ac index 7a87432f1..da0bfcd5d 100644 --- a/configure.ac +++ b/configure.ac @@ -759,6 +759,9 @@ AC_ARG_ENABLE([oss-output], AC_ARG_ENABLE([oss-wrapper], AS_HELP_STRING([--disable-oss-wrapper],[Disable optional OSS wrapper support])) +AC_ARG_WITH([pulsedsp-location], + AS_HELP_STRING([--with-pulsedsp-location],[Specify location where OSS wrapper will be installed])) + AS_IF([test "x$enable_oss_output" != "xno" -o "x$enable_oss_wrapper" != "xno"], [AC_CHECK_HEADERS([sys/soundcard.h], HAVE_OSS=1, HAVE_OSS=0)], HAVE_OSS=0) @@ -774,7 +777,12 @@ AS_IF([test "x$enable_oss_wrapper" != "xno"], [AS_IF([test "x$HAVE_OSS" = "x1"], HAVE_OSS_WRAPPER=1, HAVE_OSS_WRAPPER=0)], HAVE_OSS_WRAPPER=0) +AS_IF([test "x$with_pulsedsp_location" != "x"], + [PULSEDSP_LOCATION="$with_pulsedsp_location"], + [PULSEDSP_LOCATION="\$(pkglibdir)"]) + AC_SUBST(HAVE_OSS_OUTPUT) +AC_SUBST(PULSEDSP_LOCATION) AM_CONDITIONAL([HAVE_OSS_OUTPUT], [test "x$HAVE_OSS_OUTPUT" = "x1"]) AM_CONDITIONAL([HAVE_OSS_WRAPPER], [test "x$HAVE_OSS_WRAPPER" = "x1"]) AS_IF([test "x$HAVE_OSS_OUTPUT" = "x1"], AC_DEFINE([HAVE_OSS_OUTPUT], 1, [Have OSS output?])) diff --git a/src/Makefile.am b/src/Makefile.am index 498a3867a..558472801 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 3430a6575..fea00d2ad 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