mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
adjust various data/library paths automatically if we are run from a build tree
This commit is contained in:
parent
a562978509
commit
8a2a6b2004
6 changed files with 59 additions and 7 deletions
|
|
@ -2862,3 +2862,22 @@ void pa_reset_personality(void) {
|
|||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if defined(__linux__) && !defined(__OPTIMIZE__)
|
||||
|
||||
pa_bool_t pa_run_from_build_tree(void) {
|
||||
char *rp;
|
||||
pa_bool_t b = FALSE;
|
||||
|
||||
/* We abuse __OPTIMIZE__ as a check whether we are a debug build
|
||||
* or not. */
|
||||
|
||||
if ((rp = pa_readlink("/proc/self/exe"))) {
|
||||
b = pa_startswith(rp, PA_BUILDDIR);
|
||||
pa_xfree(rp);
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -243,4 +243,8 @@ size_t pa_pipe_buf(int fd);
|
|||
|
||||
void pa_reset_personality(void);
|
||||
|
||||
#if defined(__linux__) && !defined(__OPTIMIZE__)
|
||||
pa_bool_t pa_run_from_build_tree(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue