getopt.h sys/ipc.h sys/shm.h popt.h grp.h \
])
-AC_ARG_VAR([LTTNG_TOOLS_COMPAT_BIN_PREFIX], [Search for LTTng Tools 32-bit compatibility binaries in this location.])
-AC_DEFINE_UNQUOTED([CONFIG_COMPAT_BIN_PREFIX], $LTTNG_TOOLS_COMPAT_BIN_PREFIX, [Search for LTTng Tools 32-bit compatibility binaries in this location.])
+AC_ARG_VAR([LTTNG_TOOLS_COMPAT_BIN_DIR], [Search for LTTng Tools 32-bit compatibility binaries in this location.])
+AC_DEFINE_UNQUOTED([CONFIG_COMPAT_BIN_DIR], $LTTNG_TOOLS_COMPAT_BIN_PREFIX, [Search for LTTng Tools 32-bit compatibility binaries in this location.])
# Check for pthread
AC_CHECK_LIB([pthread], [pthread_create], [],
int ust_consumer_fd;
+static const char *compat32_consumer_bindir =
+ __stringify(CONFIG_COMPAT_BIN_DIR);
+static const char *compat32_consumer_prog = "lttng-consumerd";
+
+static
+void setup_compat32_consumer(void)
+{
+ const char *bindir;
+
+ /*
+ * runtime env. var. overrides the build default.
+ */
+ bindir = getenv("LTTNG_TOOLS_COMPAT_BIN_DIR");
+ if (bindir) {
+ compat32_consumer_bindir = bindir;
+ }
+}
+
/*
* Create a poll set with O_CLOEXEC and add the thread quit pipe to the set.
*/
fprintf(stderr, " --kconsumerd-cmd-sock PATH Specify path for the kernel consumer command socket\n");
fprintf(stderr, " --ustconsumerd-err-sock PATH Specify path for the UST consumer error socket\n");
fprintf(stderr, " --ustconsumerd-cmd-sock PATH Specify path for the UST consumer command socket\n");
+ fprintf(stderr, " --ustconsumerd-compat32 PATH Specify path for the 32-bit UST consumer daemon binary\n");
fprintf(stderr, " -d, --daemonize Start as a daemon.\n");
fprintf(stderr, " -g, --group NAME Specify the tracing group name. (default: tracing)\n");
fprintf(stderr, " -V, --version Show version number.\n");
{ "kconsumerd-err-sock", 1, 0, 'E' },
{ "ustconsumerd-cmd-sock", 1, 0, 'D' },
{ "ustconsumerd-err-sock", 1, 0, 'F' },
+ { "ustconsumerd-compat32", 1, 0, 'u' },
{ "daemonize", 0, 0, 'd' },
{ "sig-parent", 0, 0, 'S' },
{ "help", 0, 0, 'h' },
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "dhqvVS" "a:c:g:s:C:E:D:F:Z",
+ c = getopt_long(argc, argv, "dhqvVS" "a:c:g:s:C:E:D:F:Z:u",
long_options, &option_index);
if (c == -1) {
break;
opt_daemon = 1;
break;
case 'g':
- opt_tracing_group = strdup(optarg);
+ opt_tracing_group = optarg;
break;
case 'h':
usage();
case 'Z':
opt_verbose_consumer += 1;
break;
+ case 'u':
+ compat32_consumer_bindir = optarg;
+ break;
default:
/* Unknown option or other error.
* Error is printed by getopt, just return */
goto error;
}
+ setup_compat32_consumer();
+
/* Parse arguments */
progname = argv[0];
if ((ret = parse_args(argc, argv) < 0)) {