Add INSTALL_PATH define for binary execution path.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/liblttsessiondcomm \
-I$(top_srcdir)/libkernelctl -I$(top_srcdir)/libustctl
+INCLUDES = -DINSTALL_PATH=\""$(bindir)"\"
+
AM_CFLAGS = -fno-strict-aliasing
bin_PROGRAMS = ltt-sessiond
/*
* Exec kconsumerd.
*/
- execlp("ltt-kconsumerd", "ltt-kconsumerd", "--quiet", NULL);
+ execl(INSTALL_PATH "/ltt-kconsumerd", "ltt-kconsumerd", "--quiet", NULL);
if (errno != 0) {
perror("kernel start consumer exec");
}
AM_CPPFLAGS = -I$(top_srcdir)/include
+INCLUDES = -DINSTALL_PATH=\""$(bindir)"\"
+
bin_PROGRAMS = lttng
lttng_SOURCES = cmd.h conf.c conf.h commands/start.c \
/* Let's rock and roll */
if (pathname == NULL) {
- ret = asprintf(&alloc_pathname, "ltt-sessiond");
+ ret = asprintf(&alloc_pathname, INSTALL_PATH "/ltt-sessiond");
if (ret < 0) {
+ perror("asprintf spawn sessiond");
goto end;
}
pathname = alloc_pathname;