+AC_ARG_WITH([sdt], [
+ AS_HELP_STRING([--with-sdt], [provide SystemTap integration via sdt.h [default=no]])
+], [
+ with_sdt=$withval
+], [
+ with_sdt="no"
+])
+
+AS_IF([test "x$with_sdt" = "xyes"], [
+ AC_MSG_CHECKING([STAP_PROBEV()])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #define SDT_USE_VARIADIC
+ #include <sys/sdt.h>
+ void fct(void)
+ {
+ STAP_PROBEV(provider,name,1,2,3,4,5,6,7,8,9,10);
+ }
+ ]])], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([LTTNG_UST_HAVE_SDT_INTEGRATION], [1])
+ ], [
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([The sdt.h integration was requested but the STAP_PROBEV define cannot be used. Make sure it is installed, and up to date, or use CPPFLAGS=-I/path/ to specify a non-standard path to sys/sdt.h])
+ ])
+])
+
+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".]),
+], [
+ lttng_system_rundir="$withval"
+], [
+ lttng_system_rundir="/var/run/lttng"
+])
+AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
+ [LTTng system runtime directory])
+
+AC_CHECK_PROG([BUILD_GEN_TP_EXAMPLES], [python], ["yes"])
+AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test "x$BUILD_GEN_TP_EXAMPLES" = "xyes"])
+
+# Set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file
+# is not distributed in tarballs.
+AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no])
+AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"])
+
+# Enable building man pages (user's intention).
+AC_ARG_ENABLE(
+ man-pages,
+ AS_HELP_STRING(
+ [--disable-man-pages],
+ [Do not build and install man pages (already built in a distributed tarball)]
+ ),
+ [man_pages_opt=$enableval],
+ [man_pages_opt=yes]