[SESSIOND_BIN=''])
AC_SUBST([SESSIOND_BIN])
+AC_ARG_WITH([lttng-system-rundir],
+ AS_HELP_STRING([--with-lttng-system-rundir],
+ [Location of the system directory where the system-wide lttng-sessiond runtime files are kept. The default is "/var/run/lttng".]),
+ [LTTNG_SYSTEM_RUNDIR="$withval"],
+ [LTTNG_SYSTEM_RUNDIR="/var/run/lttng"])
+AC_SUBST([LTTNG_SYSTEM_RUNDIR])
+
AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_BIN], "$CONSUMERD32_BIN", [Location of the 32-bit consumerd executable.])
AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_BIN], "$CONSUMERD64_BIN", [Location of the 64-bit consumerd executable])
AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_LIBDIR], "$CONSUMERD32_LIBDIR", [Search for consumerd 32-bit libraries in this location.])
AC_DEFINE_UNQUOTED([CONFIG_BABELTRACE_BIN], "$BABELTRACE_BIN", [Location of the babeltrace viewer executable.])
AC_DEFINE_UNQUOTED([CONFIG_LTTV_GUI_BIN], "$LTTV_GUI_BIN", [Location of the lttv GUI viewer executable.])
AC_DEFINE_UNQUOTED([CONFIG_SESSIOND_BIN], "$SESSIOND_BIN", [Location of the sessiond executable.])
+AC_DEFINE_UNQUOTED([CONFIG_LTTNG_SYSTEM_RUNDIR], ["$LTTNG_SYSTEM_RUNDIR"], [LTTng system runtime directory])
# Check for pthread
AC_CHECK_LIB([pthread], [pthread_create], [],
#ifndef _DEFAULTS_H
#define _DEFAULTS_H
+#include <config.h>
+
/* Default unix group name for tracing. */
#define DEFAULT_TRACING_GROUP "tracing"
/* Default lttng run directory */
#define DEFAULT_LTTNG_HOME_ENV_VAR "LTTNG_HOME"
#define DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR "HOME"
-#define DEFAULT_LTTNG_RUNDIR "/var/run/lttng"
+#define DEFAULT_LTTNG_RUNDIR CONFIG_LTTNG_SYSTEM_RUNDIR
#define DEFAULT_LTTNG_HOME_RUNDIR "%s/.lttng"
#define DEFAULT_LTTNG_SESSIOND_PIDFILE "lttng-sessiond.pid"