doc: remove duplicate LTTNG_UST_BLOCKING_RETRY_TIMEOUT man page entry
[lttng-ust.git] / configure.ac
index 312a1432edf47cbe9fdbdd58ab0ea69dfa138812..77b5db407558ab7962e0ee52ca107920d7b0bc02 100644 (file)
@@ -3,13 +3,13 @@ dnl Process this file with autoconf to produce a configure script.
 
 dnl Version infos
 m4_define([V_MAJOR], [2])
-m4_define([V_MINOR], [8])
+m4_define([V_MINOR], [10])
 m4_define([V_PATCH], [0])
-m4_define([V_EXTRA], [pre])
+m4_define([V_EXTRA], [rc1])
 m4_define([V_STRING], [V_MAJOR.V_MINOR.V_PATCH])
 m4_ifdef([V_EXTRA], [m4_append([V_STRING], [-V_EXTRA])])
-m4_define([V_NAME], [[Herbe à Détourne]])
-m4_define([V_DESC], [[Brewed with unrestrained amounts of Citra hop, the Herbe à Détourne is a fantastic New World Tripel brewed by "Dieu du Ciel!". Aromas of mango, cantaloupe melon and passion fruit, combined with a controlled bitter finish, unite in making this smooth golden-orange beer stand apart.]])
+m4_define([V_NAME], [[KeKriek]])
+m4_define([V_DESC], [[From Brasserie Dunham, a sour mashed golden wheat ale fermented with local sour cherries from Tougas orchards. Fresh sweet cherry notes with some tartness, lively carbonation with a dry finish.]])
 
 AC_INIT([lttng-ust], V_STRING, [mathieu dot desnoyers at efficios dot com])
 
@@ -22,7 +22,7 @@ AC_SUBST([LTTNG_UST_LIBRARY_VERSION], [0:0:0])
 
 # This is the library version of liblttng-ust-ctl, used internally by
 # liblttng-ust, lttng-sessiond, and lttng-consumerd.
-AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], [2:0:0])
+AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], [3:0:1])
 
 AC_CONFIG_AUX_DIR([config])
 AC_CANONICAL_TARGET
@@ -33,6 +33,8 @@ AM_MAINTAINER_MODE([enable])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_SRCDIR([include/lttng/tracepoint.h])
 
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+
 # Configuration options, which will be installed in the config.h
 AC_CONFIG_HEADERS([config.h include/lttng/ust-config.h])
 AH_TEMPLATE([LTTNG_UST_HAVE_EFFICIENT_UNALIGNED_ACCESS], [Use efficient unaligned access.])
@@ -47,6 +49,7 @@ AC_SUBST([PATCHLEVEL_VERSION], [V_PATCH])
 AC_PROG_SED
 AC_PROG_GREP
 AC_PROG_LN_S
+AC_PROG_MKDIR_P
 
 # libtool link_all_deplibs fixup. See http://bugs.lttng.org/issues/321.
 AC_ARG_ENABLE([libtool-linkdep-fixup], [
@@ -77,6 +80,8 @@ AM_CONDITIONAL([NO_SHARED], [test "x$enable_shared" = "xno"])
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
+AC_CHECK_PROG([HAVE_CMAKE], [cmake], ["yes"])
+AM_CONDITIONAL([HAVE_CMAKE], [test "x$HAVE_CMAKE" = "xyes"])
 AC_PROG_MAKE_SET
 LT_INIT
 
@@ -120,19 +125,32 @@ AS_IF([test "x${ax_cv_sys_weak_alias}" = "xno"], [
 # Checks for libraries.
 AC_CHECK_LIB([dl], [dlopen], [
        have_libdl=yes
+       libdl_name=dl
 ], [
        #libdl not found, check for dlopen in libc.
        AC_CHECK_LIB([c], [dlopen], [
                have_libc_dl=yes
+               libdl_name=c
        ], [
                AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.])
        ])
 ])
 
+# Check if libdl has dlmopen support.
+AH_TEMPLATE([HAVE_DLMOPEN], ["Define to 1 if dlmopen is available."])
+AC_CHECK_LIB([$libdl_name], [dlmopen],
+       [AC_DEFINE([HAVE_DLMOPEN], [1])]
+)
+
 AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBDL], [test "x$have_libdl" = "xyes"])
 AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"])
 
 AC_CHECK_LIB([pthread], [pthread_create])
+AC_CHECK_LIB([pthread], [pthread_setname_np],
+       AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define to 1 if pthread_setname_np is available.]),
+       AC_CHECK_LIB([pthread], [pthread_set_name_np],
+               AC_DEFINE([HAVE_PTHREAD_SET_NAME_NP], [1], [Define to 1 if pthread_set_name_np is available.]),
+               AC_MSG_RESULT([pthread setname/set_name not found.])))
 
 # Check for dlfcn.h
 AC_CHECK_HEADER([dlfcn.h])
@@ -206,18 +224,11 @@ AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [], [AC_MSG_ERROR([liburcu 0.6 or newer i
 # optional linux/perf_event.h
 AC_CHECK_HEADERS([linux/perf_event.h], [have_perf_event=yes], [])
 
-# Perf event counters are only supported on x86 so far.
-AC_MSG_CHECKING([UST support for architecture perf event counters])
-AS_CASE([$host_cpu],
-       [i[[3456]]86], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
-       [x86_64], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
-       [amd64], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
-       [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=no])
-AC_MSG_RESULT([$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS])
-
-AM_CONDITIONAL([HAVE_PERF_EVENT], [test "x$have_perf_event" = "xyes" && test "x$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS" = "xyes"])
+# Perf event counters are supported on all architectures supported by
+# perf, using the read system call as fallback.
+AM_CONDITIONAL([HAVE_PERF_EVENT], [test "x$have_perf_event" = "xyes"])
 
-AS_IF([test "x$have_perf_event" = "xyes" && test "x$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS" = "xyes"], [
+AS_IF([test "x$have_perf_event" = "xyes"], [
        AC_DEFINE([LTTNG_UST_HAVE_PERF_EVENT], [1])
 ])
 
@@ -234,7 +245,7 @@ AS_CASE([$host_cpu],
        [s390], [NO_UNALIGNED_ACCESS=1],
        [s390x], [NO_UNALIGNED_ACCESS=1],
        [arm*], [NO_UNALIGNED_ACCESS=1],
-       [aarch64], [NO_UNALIGNED_ACCESS=1],
+       [aarch64*], [NO_UNALIGNED_ACCESS=1],
        [mips*], [NO_UNALIGNED_ACCESS=1],
        [tile*], [NO_UNALIGNED_ACCESS=1],
        [
@@ -368,10 +379,78 @@ AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
 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]
+)
+
+# Check for asciidoc and xmlto if we enabled building the man pages.
+have_asciidoc_xmlto=no
+
+AS_IF([test "x$man_pages_opt" = "xyes"], [
+       AC_PATH_PROG([ASCIIDOC], [asciidoc], [no])
+       AC_PATH_PROG([XMLTO], [xmlto], [no])
+
+       AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [
+               AS_IF([test "x$in_git_repo" = "xyes"], [
+                       # This is an error because we're in the Git repo, which
+                       # means the man pages are not already generated for us,
+                       # thus asciidoc/xmlto are required because we were asked
+                       # to build the man pages.
+                       AC_MSG_ERROR([
+Both asciidoc and xmlto are needed to build the LTTng-UST man pages. Use
+--disable-man-pages to disable building the man pages, in which case
+they will not be installed.
+                       ])
+               ], [
+                       # Only warn here: since we're in the tarball, the man
+                       # pages should already be generated at this point, thus
+                       # asciidoc/xmlto are not strictly required.
+                       AC_MSG_WARN([
+Both asciidoc and xmlto are needed to build the LTTng-UST man pages.
+Note that the man pages are already built in this distribution tarball,
+so asciidoc and xmlto are only needed if you intend to modify their
+sources. Use --disable-man-pages to completely disable building
+and installing the man pages.
+                       ])
+               ])
+       ], [
+               have_asciidoc_xmlto=yes
+       ])
+])
+
+# Export man page build condition: build the man pages if the user
+# asked for it, and if the tools are available.
+AM_CONDITIONAL([MAN_PAGES_OPT], [test "x$man_pages_opt" != "xno"])
+AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"])
+
+# Default values
+AC_DEFUN([_AC_DEFINE_AND_SUBST], [
+       AC_DEFINE_UNQUOTED([CONFIG_$1], [$2], [$1])
+       $1="$2"
+       AC_SUBST([$1])
+])
+
+_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
+# By default, do not retry on buffer full condition.
+_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_BLOCKING_RETRY_TIMEOUT_MS], [0])
+
 AC_CONFIG_FILES([
        Makefile
        doc/Makefile
        doc/examples/Makefile
+       doc/man/Makefile
        include/Makefile
        include/lttng/ust-version.h
        snprintf/Makefile
@@ -381,9 +460,11 @@ AC_CONFIG_FILES([
        liblttng-ust-ctl/Makefile
        liblttng-ust-fork/Makefile
        liblttng-ust-dl/Makefile
+       liblttng-ust-fd/Makefile
        liblttng-ust-java/Makefile
        liblttng-ust-java-agent/Makefile
        liblttng-ust-java-agent/java/Makefile
+       liblttng-ust-java-agent/java/lttng-ust-agent-all/Makefile
        liblttng-ust-java-agent/java/lttng-ust-agent-common/Makefile
        liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile
        liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile
@@ -408,6 +489,7 @@ AC_CONFIG_FILES([
        tests/benchmark/Makefile
        tests/utils/Makefile
        tests/test-app-ctx/Makefile
+       tests/gcc-weak-hidden/Makefile
        lttng-ust.pc
 ])
 
@@ -421,27 +503,28 @@ AC_CONFIG_LINKS([
 
 AC_OUTPUT
 
+AS_ECHO
 AS_ECHO(["m4_bpatsubst(V_NAME, ["], [\\"])"])
-AS_ECHO()
+AS_ECHO
 AS_ECHO(["m4_bpatsubst(V_DESC, ["], [\\"])"])
 
 # Report on the configuration options
-AS_ECHO()
+AS_ECHO
 AS_ECHO(["LTTng-UST will be built with the following options:"])
 
-AS_ECHO()
+AS_ECHO
 
 AS_ECHO_N(["Java agent (JUL support): "])
-AS_IF([test "x$java_agent_jul" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
+AS_IF([test "x$java_agent_jul" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled (Use --enable-java-agent-jul)"])])
 
 AS_ECHO_N(["Java agent (Log4j support): "])
-AS_IF([test "x$java_agent_log4j" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
+AS_IF([test "x$java_agent_log4j" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled (Use --enable-java-agent-log4j)"])])
 
 AS_ECHO_N(["JNI interface (JNI): "])
-AS_IF([test "x$jni_interface" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
+AS_IF([test "x$jni_interface" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled (Use --enable-jni-interface)"])])
 
 AS_ECHO_N(["Python ($PYTHON) agent: "])
-AS_IF([test "x$python_agent" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
+AS_IF([test "x$python_agent" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled (Use --enable-python-agent)"])])
 
 AS_ECHO_N(["sdt.h integration: "])
 AS_IF([test "x$with_sdt" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
@@ -450,7 +533,7 @@ AS_ECHO(["Architecture: $host_cpu"])
 AS_ECHO_N(["Efficient unaligned memory access: "])
 AS_IF([test "x$NO_UNALIGNED_ACCESS" != "x1"], [AS_ECHO(["yes"])], [AS_IF([test "x$UNSUPPORTED_ARCH" != "x1"], [AS_ECHO(["no"])], [AS_ECHO(["unknown"])])])
 AS_IF([test "x$UNSUPPORTED_ARCH" = "x1"], [AC_MSG_WARN([Your architecture ($host_cpu) is unsupported, using safe default of no unaligned access])])
-AS_ECHO()
+AS_ECHO
 
 AS_ECHO(["Type 'make' to compile."])
 
This page took 0.026865 seconds and 4 git commands to generate.