build-sys: use the same modlibexecdir as PulseAudio 06/25206/1
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Mon, 23 Jun 2014 13:20:29 +0000 (16:20 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 30 Jul 2014 16:11:40 +0000 (19:11 +0300)
When running ./configure, the old way of setting modlibexecdir
resulted in "/usr/local/lib/pulse-/modules" on my machine, which is
obviously wrong (it's missing the version number after "pulse-"). I
didn't track down the root cause (I suspect that the pkg-config
command used for getting the version didn't find the .pc file from
/usr/local), but I think the old way didn't make sense anyway. Why
would anyone want to use any other value for modlibexecdir than what
is used for building the upstream PulseAudio modules? This patch
reads the modlibexecdir value from pulseaudio-module-devel.pc. Now
the modlibexecdir value on my machine is
"/usr/local/lib/pulse-5.0/modules" as it should.

Change-Id: If8f9db70aea6c157d19f14ec370c571279fa5eb1

configure.ac

index 82ab1c0..ed625f4 100644 (file)
@@ -70,6 +70,8 @@ AC_SUBST(LIBPULSE_LIBS)
 PKG_CHECK_MODULES(PULSEDEVEL, [pulseaudio-module-devel])
 AC_SUBST(PULSEDEVEL_CFLAGS)
 AC_SUBST(PULSEDEVEL_LIBS)
+PKG_CHECK_VAR([modlibexecdir], [pulseaudio-module-devel], [modlibexecdir])
+AC_SUBST([modlibexecdir])
 
 PKG_CHECK_MODULES(MURPHYCOMMON, [murphy-common])
 AC_SUBST(MURPHYCOMMON_CFLAGS)
@@ -131,19 +133,6 @@ PKG_CHECK_MODULES(MURPHYDOMCTL, [murphy-domain-controller murphy-pulse])
 AC_SUBST(MURPHYDOMCTL_CFLAGS)
 AC_SUBST(MURPHYDOMCTL_LIBS)
 
-
-
-
-# module directory
-AC_ARG_WITH([module-dir],
-            [AS_HELP_STRING([--with-module-dir], [Directory where to install the modules to (defaults to ${LIBDIR}/pulse-${PA_MAJORMINOR}/modules/])],
-            [modlibexecdir=$withval],
-            [modlibexecdir=${LIBDIR}/pulse-${PA_MAJORMINOR}/modules]
-)
-
-AC_SUBST(modlibexecdir)
-
-
 # documentation
 AC_ARG_WITH([documentation],
             [AS_HELP_STRING([--with-documentation],