]> code.delx.au - pulseaudio/commitdiff
alsa: Fix mixer path when running from build tree
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 14 Apr 2013 05:54:41 +0000 (11:24 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 14 Apr 2013 05:57:41 +0000 (11:27 +0530)
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.

configure.ac
src/Makefile.am
src/modules/alsa/alsa-mixer.c
src/tests/alsa-mixer-path-test.c

index 43d3b44d53f3a32c0256c3ba6dcb831faa77399d..6a45c124a677efe6233114c4bfabd485ef6ef778 100644 (file)
@@ -1239,8 +1239,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,
index 4b3efa37ef5f4649922a6cb484406f52341712d4..a621a30083f4903a590d44b19807a01453c80a0e 100644 (file)
@@ -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
 
index b65baeb690ff5888bf71f1d77e2aaea443b48938..554a57df16f31253ffb0e7d6237f64ee50055f07 100644 (file)
@@ -2373,7 +2373,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;
 }
index 1ad06ee1ea7be7a14b188e07da759849252ee4c3..f2bc4cbf310184061a3956f07f3a9b6d3285f8ca 100644 (file)
@@ -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;
 }