summaryrefslogtreecommitdiff
path: root/src/modules/alsa/alsa-mixer.c
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-12-07 15:48:49 +0800
committerTanu Kaskinen <tanuk@iki.fi>2018-12-11 16:15:32 +0200
commit3d9deb1e5679e15c3277e144a822be9b0a036514 (patch)
treebc1508253eade06a827f7ba2e304cc8ad9cadbed /src/modules/alsa/alsa-mixer.c
parentbae8c16bfadb43c596b03f9c7ff7c9e9f1709b76 (diff)
build-sys: introduce a special build flag to explicitly disables running from build tree
It is helpful to improve reproducibility build [1] since PA_SRCDIR/PA_BUILDDIR contains build path, --disable-running-from-build-tree could drop these macros at precompilation. [1] https://reproducible-builds.org/ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Diffstat (limited to 'src/modules/alsa/alsa-mixer.c')
-rw-r--r--src/modules/alsa/alsa-mixer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 7d50fc7b8..91dfc66ee 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2573,9 +2573,11 @@ static int path_verify(pa_alsa_path *p) {
}
static const char *get_default_paths_dir(void) {
+#ifdef HAVE_RUNNING_FROM_BUILD_TREE
if (pa_run_from_build_tree())
return PA_SRCDIR "/modules/alsa/mixer/paths/";
else
+#endif
return PA_ALSA_PATHS_DIR;
}
@@ -4458,7 +4460,9 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
fname = "default.conf";
fn = pa_maybe_prefix_path(fname,
+#ifdef HAVE_RUNNING_FROM_BUILD_TREE
pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" :
+#endif
PA_ALSA_PROFILE_SETS_DIR);
r = pa_config_parse(fn, NULL, items, NULL, false, ps);