summaryrefslogtreecommitdiffstats
path: root/src/daemon/daemon-conf.c
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2009-08-24 14:43:11 +0300
committerTanu Kaskinen <tanuk@iki.fi>2009-08-24 14:43:11 +0300
commit2f3fc2f1d6ba418303a4bab6f8fd3caed7d291b4 (patch)
tree00bccb466ce49367f6fd54fe9f7f90557eea8738 /src/daemon/daemon-conf.c
parent3025645b0b58f476f6404f2aed3b61a633794d10 (diff)
parentbe46eaa5b6324d84c5ecbed5dd72dec1c87e0cb1 (diff)
Merge branch 'master' of git://0pointer.de/pulseaudio into dbus-work
Conflicts: src/Makefile.am
Diffstat (limited to 'src/daemon/daemon-conf.c')
-rw-r--r--src/daemon/daemon-conf.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 31f29009..3428f807 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -136,9 +136,25 @@ static const pa_daemon_conf default_conf = {
};
pa_daemon_conf* pa_daemon_conf_new(void) {
- pa_daemon_conf *c = pa_xnewdup(pa_daemon_conf, &default_conf, 1);
+ pa_daemon_conf *c;
+
+ c = pa_xnewdup(pa_daemon_conf, &default_conf, 1);
+
+#if defined(__linux__) && !defined(__OPTIMIZE__)
+
+ /* We abuse __OPTIMIZE__ as a check whether we are a debug build
+ * or not. If we are and are run from the build tree then we
+ * override the search path to point to our build tree */
+
+ if (pa_run_from_build_tree()) {
+ pa_log_notice("Detected that we are run from the build tree, fixing search path.");
+ c->dl_search_path = pa_xstrdup(PA_BUILDDIR "/.libs/");
+
+ } else
+
+#endif
+ c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
- c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
return c;
}