dnl SPDX-License-Identifier: GPL-2.0-only
AC_PREREQ([2.64])
-AC_INIT([lttng-tools],[2.12.0-rc1],[jeremie.galarneau@efficios.com],[],[https://lttng.org])
+AC_INIT([lttng-tools],[2.12.8],[jeremie.galarneau@efficios.com],[],[https://lttng.org])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_AUX_DIR([config])
# Enable silent rules if available (Introduced in AM 1.11)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AC_REQUIRE_AUX_FILE([tap-driver.sh])
-
# Checks for C compiler
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PROG_CC
-AC_PROG_CC_STDC
+# AC_PROG_CC_STDC was merged in AC_PROG_CC in autoconf 2.70
+m4_version_prereq([2.70], [], [AC_PROG_CC_STDC])
AC_PROG_CXX
RW_PROG_CXX_WORKS
AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
# -Wunknown-warning-option diagnostic fatal with clang.
AX_APPEND_COMPILE_FLAGS([ dnl
-Wall dnl
+ dnl We currently get this warning when building with Clang:
+ dnl
+ dnl /usr/include/setjmp.h:54:12: error: declaration of built-in function '__sigsetjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header <setjmp.h>. [-Werror,-Wincomplete-setjmp-declaration]
+ dnl extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
+ dnl ^
+ -Wno-incomplete-setjmp-declaration dnl
+ -Wdiscarded-qualifiers dnl
+ -Wmissing-declarations dnl
+ -Wmissing-prototypes dnl
+ -Wmissing-parameter-type dnl
+ -Wold-style-definition dnl
+ -Wstrict-prototypes dnl
],
[WARN_CFLAGS],
[-Werror])
+# When given, add -Werror to WARN_CFLAGS.
+AC_ARG_ENABLE([Werror],
+ [AS_HELP_STRING([--enable-Werror], [Treat compiler warnings as errors.])]
+)
+AS_IF([test "x$enable_Werror" = "xyes"],
+ [WARN_CFLAGS="${WARN_CFLAGS} -Werror"]
+)
+
# Checks for programs.
AC_PROG_GREP
AC_PROG_MAKE_SET
AM_CONDITIONAL([HAVE_BISON], [test "x$have_bison" = "xyes"])
# check for flex
-AC_PROG_LEX
+# Prior to autoconf 2.70, AC_PROG_FLEX did not take an argument. This is not a
+# problem since the argument is silently ignored by older versions.
+AC_PROG_LEX([noyywrap])
FLEX=$LEX
AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes])
AC_CHECK_FUNC([clock_gettime], [AC_DEFINE_UNQUOTED([LTTNG_HAVE_CLOCK_GETTIME], 1, [Has clock_gettime() support.])])
# URCU library version needed or newer
-m4_define([WRONG_LIBURCU_MSG], [Userspace RCU (liburcu) >= 0.9.0 is needed])
+m4_define([WRONG_LIBURCU_MSG], [Userspace RCU (liburcu) >= 0.11.0 is needed])
# Check liburcu needed function calls
AC_CHECK_DECL([cds_list_add], [],
[AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include <urcu.h>]]
)
-#Function added in urcu 0.9.0
-AC_CHECK_DECL([urcu_ref_get_unless_zero], [],
- [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include <urcu/ref.h>]]
+#Function added in urcu 0.11.0
+AC_CHECK_DECL([urcu_memb_barrier], [],
+ [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include <urcu/urcu-memb.h>]]
)
# Check for libkmod, it will be auto-neabled if found but won't fail if it's not,
swig_version=2.0.0
AC_ARG_ENABLE([python-bindings],
- [AC_HELP_STRING([--enable-python-bindings],
+ [AS_HELP_STRING([--enable-python-bindings],
[compile Python bindings])],
[enable_python_binding=$enableval], [enable_python_binding=no])
AM_CFLAGS="${WARN_CFLAGS} -fno-strict-aliasing $PTHREAD_CFLAGS"
AC_SUBST(AM_CFLAGS)
+# This is set even though it is empty, so Makefiles can do "AM_LDFLAGS += ...".
+AM_LDFLAGS=""
+AC_SUBST(AM_LDFLAGS)
+
# The order in which the include folders are searched is important.
# The top_builddir should always be searched first in the event that a build
# time generated file is included. An example of this is the "version.i" file.
test ! -z "$PYTHON3_AGENT" && value=1 || value=0
PPRINT_PROP_BOOL([LTTng-UST Python3 agent tests], $value)
-# LTTng UST Java agent Log4j tests enabled/disabled
+# userspace-probe SDT instrumentation tests enabled/disabled
test "x$test_sdt_uprobe" = "xyes" && value=1 || value=0
-PPRINT_PROP_BOOL([LTTng-UST SDT uprobe tests], $value)
+PPRINT_PROP_BOOL([LTTng-modules SDT uprobe tests], $value)
#Python binding enabled/disabled
test "x$enable_python_binding" = xyes && value=1 || value=0