diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2013-04-14 11:24:41 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2013-04-16 16:28:17 +0530 |
commit | c9648ecca41bf7d36a75334251ee31bcaa7d185f (patch) | |
tree | 0c225abb91d2c5a16c2e643ed2407493769fa43c | |
parent | 8905ec03fba33d071b094a7a5553caa3bd470ae7 (diff) |
alsa: Fix mixer path when running from build tree
The mixer paths are not available in ${builddir} - we need to look in
${srcdir}. This should fix running an in-tree build without make install
as well as alsa-mixer-path-test in make distcheck.
Since the most straightforward way to define PA_SRCDIR was in
Makefile.am, I'm moving PA_BUILDDIR there as well for consistency.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/modules/alsa/alsa-mixer.c | 2 | ||||
-rw-r--r-- | src/tests/alsa-mixer-path-test.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index b9411e56..9125470f 100644 --- a/configure.ac +++ b/configure.ac @@ -1242,8 +1242,6 @@ AC_SUBST(PA_SOEXT, [.so]) AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"]) AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files]) -AC_DEFINE_UNQUOTED(PA_BUILDDIR, "${ac_pwd}/src", [Location of uninstalled binaries]) - #### Mac OSX specific stuff ##### AC_ARG_ENABLE(mac-universal, diff --git a/src/Makefile.am b/src/Makefile.am index 4b3efa37..a621a300 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,7 +48,9 @@ AM_CPPFLAGS = \ -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \ -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" AM_CFLAGS = \ - $(PTHREAD_CFLAGS) + $(PTHREAD_CFLAGS) \ + -DPA_SRCDIR=\"$(abs_srcdir)\" \ + -DPA_BUILDDIR=\"$(abs_builddir)\" AM_CXXFLAGS = $(AM_CFLAGS) SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 4ebce39b..9a428f4f 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -2380,7 +2380,7 @@ static int path_verify(pa_alsa_path *p) { static const char *get_default_paths_dir(void) { if (pa_run_from_build_tree()) - return PA_BUILDDIR "/modules/alsa/mixer/paths/"; + return PA_SRCDIR "/modules/alsa/mixer/paths/"; else return PA_ALSA_PATHS_DIR; } diff --git a/src/tests/alsa-mixer-path-test.c b/src/tests/alsa-mixer-path-test.c index 1ad06ee1..f2bc4cbf 100644 --- a/src/tests/alsa-mixer-path-test.c +++ b/src/tests/alsa-mixer-path-test.c @@ -16,7 +16,7 @@ /* This function was copied from alsa-mixer.c */ static const char *get_default_paths_dir(void) { if (pa_run_from_build_tree()) - return PA_BUILDDIR "/modules/alsa/mixer/paths/"; + return PA_SRCDIR "/modules/alsa/mixer/paths/"; else return PA_ALSA_PATHS_DIR; } |