getopt.h sys/ipc.h sys/shm.h popt.h grp.h \
])
-AC_ARG_WITH([consumerd32-path],
- AS_HELP_STRING([--with-consumerd32-path],
- [Location of the 32-bit consumerd executable]),
- [CONSUMERD32_PATH="$withval"],
- [CONSUMERD32_PATH=''])
-AC_SUBST([CONSUMERD32_PATH])
-
-AC_ARG_WITH([consumerd64-path],
- AS_HELP_STRING([--with-consumerd64-path],
- [Location of the 64-bit consumerd executable]),
- [CONSUMERD64_PATH="$withval"],
- [CONSUMERD64_PATH=''])
-AC_SUBST([CONSUMERD64_PATH])
+AC_ARG_WITH([consumerd32-bin],
+ AS_HELP_STRING([--with-consumerd32-bin],
+ [Location of the 32-bit consumerd executable (including the filename)]),
+ [CONSUMERD32_BIN="$withval"],
+ [CONSUMERD32_BIN=''])
+AC_SUBST([CONSUMERD32_BIN])
+
+AC_ARG_WITH([consumerd64-bin],
+ AS_HELP_STRING([--with-consumerd64-bin],
+ [Location of the 64-bit consumerd executable (including the filename)]),
+ [CONSUMERD64_BIN="$withval"],
+ [CONSUMERD64_BIN=''])
+AC_SUBST([CONSUMERD64_BIN])
AC_ARG_WITH([consumerd32-libdir],
AS_HELP_STRING([--with-consumerd32-libdir],
- [Location of the 32-bit consumerd libraries]),
+ [Directory containing the 32-bit consumerd libraries]),
[CONSUMERD32_LIBDIR="$withval"],
[CONSUMERD32_LIBDIR=''])
AC_SUBST([CONSUMERD32_LIBDIR])
AC_ARG_WITH([consumer64d-libdir],
AS_HELP_STRING([--with-consumerd64-libdir],
- [Location of the 64-bit consumerd libraries]),
+ [Directory containing the 64-bit consumerd libraries]),
[CONSUMERD64_LIBDIR="$withval"],
[CONSUMERD64_LIBDIR=''])
AC_SUBST([CONSUMERD64_LIBDIR])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_PATH], $CONSUMERD32_PATH, [Location of the 32-bit consumerd executable.])
-AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_PATH], $CONSUMERD64_PATH, [Location of the 64-bit consumerd executable])
+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_CONSUMERD64_LIBDIR], $CONSUMERD64_LIBDIR, [Search for consumerd 64-bit libraries in this location.])
int ust_consumerd64_fd = -1;
int ust_consumerd32_fd = -1;
-static const char *consumerd32_path =
- __stringify(CONFIG_CONSUMERD32_PATH);
-static const char *consumerd64_path =
- __stringify(CONFIG_CONSUMERD64_PATH);
+static const char *consumerd32_bin =
+ __stringify(CONFIG_CONSUMERD32_BIN);
+static const char *consumerd64_bin =
+ __stringify(CONFIG_CONSUMERD64_BIN);
static const char *consumerd32_libdir =
__stringify(CONFIG_CONSUMERD32_LIBDIR);
static const char *consumerd64_libdir =
static
void setup_consumerd_path(void)
{
- const char *path, *libdir;
+ const char *bin, *libdir;
/*
* Allow INSTALL_BIN_PATH to be used as a target path for the
* has not been defined.
*/
#if (CAA_BITS_PER_LONG == 32)
- if (!consumerd32_path[0]) {
- consumerd32_path = INSTALL_BIN_PATH "/" CONSUMERD_FILE;
+ if (!consumerd32_bin[0]) {
+ consumerd32_bin = INSTALL_BIN_PATH "/" CONSUMERD_FILE;
}
if (!consumerd32_libdir[0]) {
consumerd32_libdir = INSTALL_LIB_PATH;
}
#elif (CAA_BITS_PER_LONG == 64)
- if (!consumerd64_path[0]) {
- consumerd64_path = INSTALL_BIN_PATH "/" CONSUMERD_FILE;
+ if (!consumerd64_bin[0]) {
+ consumerd64_bin = INSTALL_BIN_PATH "/" CONSUMERD_FILE;
}
if (!consumerd64_libdir[0]) {
consumerd64_libdir = INSTALL_LIB_PATH;
/*
* runtime env. var. overrides the build default.
*/
- path = getenv("LTTNG_CONSUMERD32_PATH");
- if (path) {
- consumerd32_path = path;
+ bin = getenv("LTTNG_CONSUMERD32_BIN");
+ if (bin) {
+ consumerd32_bin = bin;
}
- path = getenv("LTTNG_CONSUMERD64_PATH");
- if (path) {
- consumerd64_path = path;
+ bin = getenv("LTTNG_CONSUMERD64_BIN");
+ if (bin) {
+ consumerd64_bin = bin;
}
libdir = getenv("LTTNG_TOOLS_CONSUMERD32_LIBDIR");
if (libdir) {
}
switch (consumer_data->type) {
case LTTNG_CONSUMER_KERNEL:
- execl(INSTALL_BIN_PATH "/lttng-consumerd",
+ execl(INSTALL_BIN_PATH "/" CONSUMERD_FILE,
"lttng-consumerd", verbosity, "-k",
"--consumerd-cmd-sock", consumer_data->cmd_unix_sock_path,
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
goto error;
}
}
- ret = execl(consumerd64_path, verbosity, "-u",
+ ret = execl(consumerd64_bin, verbosity, "-u",
"--consumerd-cmd-sock", consumer_data->cmd_unix_sock_path,
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
NULL);
goto error;
}
}
- ret = execl(consumerd32_path, verbosity, "-u",
+ ret = execl(consumerd32_bin, verbosity, "-u",
"--consumerd-cmd-sock", consumer_data->cmd_unix_sock_path,
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
NULL);
/* Start the UST consumer daemons */
/* 64-bit */
pthread_mutex_lock(&ustconsumer64_data.pid_mutex);
- if (consumerd64_path[0] != '\0' &&
+ if (consumerd64_bin[0] != '\0' &&
ustconsumer64_data.pid == 0 &&
cmd_ctx->lsm->cmd_type != LTTNG_REGISTER_CONSUMER) {
pthread_mutex_unlock(&ustconsumer64_data.pid_mutex);
pthread_mutex_unlock(&ustconsumer64_data.pid_mutex);
}
/* 32-bit */
- if (consumerd32_path[0] != '\0' &&
+ if (consumerd32_bin[0] != '\0' &&
ustconsumer32_data.pid == 0 &&
cmd_ctx->lsm->cmd_type != LTTNG_REGISTER_CONSUMER) {
pthread_mutex_unlock(&ustconsumer32_data.pid_mutex);
opt_verbose_consumer += 1;
break;
case 'u':
- consumerd32_path= optarg;
+ consumerd32_bin= optarg;
break;
case 'U':
consumerd32_libdir = optarg;
break;
case 't':
- consumerd64_path = optarg;
+ consumerd64_bin = optarg;
break;
case 'T':
consumerd64_libdir = optarg;