ABI: refuse non-matching ABI minor version on event registration
[lttng-ust.git] / configure.ac
index 19e4b74678c1d6cd7f21140fbc65f823bc020c86..b48f91d1d3fc41ace813105766f30b5df787eef7 100644 (file)
@@ -4,8 +4,8 @@ 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_PATCH], [0])
-m4_define([V_EXTRA], [rc1])
+m4_define([V_PATCH], [4])
+dnl m4_define([V_EXTRA], [])
 m4_define([V_STRING], [V_MAJOR.V_MINOR.V_PATCH])
 m4_ifdef([V_EXTRA], [m4_append([V_STRING], [-V_EXTRA])])
 m4_define([V_NAME], [[Isseki Nicho]])
@@ -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.])
@@ -169,8 +171,6 @@ dnl AC_CHECK_TYPES([ptrdiff_t])
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol sched_getcpu sysconf])
 
-CFLAGS="-Wall $CFLAGS"
-
 # URCU
 
 # urcu - check if we just find the headers it out of the box.
@@ -234,7 +234,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],
        [
@@ -295,10 +295,13 @@ AS_IF([test "x$jni_interface" = "xyes" || test "x$java_agent_jul" = "xyes" || te
        AX_JNI_INCLUDE_DIR
        for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
        do
-               CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
+               JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR"
        done
 
+       saved_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $JNI_CPPFLAGS"
        AX_PROG_JAVAH
+       CPPFLAGS="$saved_CPPFLAGS"
 ])
 
 AS_IF([test "x$java_agent_log4j" = "xyes"], [
@@ -368,10 +371,80 @@ 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])
+
+AM_CFLAGS="-Wall"
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(JNI_CPPFLAGS)
+
 AC_CONFIG_FILES([
        Makefile
        doc/Makefile
        doc/examples/Makefile
+       doc/man/Makefile
        include/Makefile
        include/lttng/ust-version.h
        snprintf/Makefile
@@ -384,6 +457,7 @@ AC_CONFIG_FILES([
        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 +482,7 @@ AC_CONFIG_FILES([
        tests/benchmark/Makefile
        tests/utils/Makefile
        tests/test-app-ctx/Makefile
+       tests/gcc-weak-hidden/Makefile
        lttng-ust.pc
 ])
 
This page took 0.024502 seconds and 4 git commands to generate.