Building LTTng-UST with --disable-shared compiles fine, but the
resulting installed static libraries silently fails to trace, because
tracepoint fails to dlopen liblttng-ust-tracepoint.so. So don't allow
this unsupported configure option.
Also document this requirement in the README.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
installs. However, this path is not part of most distributions' default
library path which will cause builds depending on liblttng-ust to fail unless
'-L/usr/local/lib' is added to LDFLAGS. You may provide a custom prefix to
- configure by using the --prefix switch.
+ configure by using the --prefix switch. Note that LTTng-UST needs to
+ be a shared library, even if the tracepoint probe provider is statically
+ linked into the application.
USAGE:
])
])
+AC_MSG_CHECKING([whether shared libraries are enabled])
+AS_IF([test "x$enable_shared" = "xyes"],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([LTTng-UST requires shared libraries to be enabled])
+ ])
+
AC_ARG_WITH([lttng-system-rundir],
AS_HELP_STRING([--with-lttng-system-rundir],
[Location of the system directory where LTTng-UST expects the system-wide lttng-sessiond runtime files. The default is "/var/run/lttng".]),