X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=9c32687192bc55524c8181e09cdaa64421a452ae;hb=refs%2Fheads%2Fstable-2.12;hp=0614b270efcfa42e3c64856603a9143dd9998cc6;hpb=d2cb81f7749765ac95559aa6900138433583ab03;p=lttng-tools.git diff --git a/configure.ac b/configure.ac index 0614b270e..9c3268719 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ 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.15],[jeremie.galarneau@efficios.com],[],[https://lttng.org]) AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_AUX_DIR([config]) @@ -15,13 +15,12 @@ AM_MAINTAINER_MODE([enable]) # 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"]) @@ -32,6 +31,18 @@ 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 . [-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]) @@ -52,15 +63,15 @@ AC_PATH_PROG([report_fold], [fold]) LT_INIT # Check for objcopy, required by the base address statedump and dynamic linker tests -AC_CHECK_TOOL([OBJCOPY], [objcopy], [no]) -AS_IF([test "x$OBJCOPY" = "xno"], +AC_CHECK_TOOL([OBJCOPY], [objcopy]) +AS_IF([test "x$OBJCOPY" = "x"], [AC_MSG_WARN([Cannot find objcopy. The base address statedump and dynamic linker tests will be disabled. Install the binutils package to remediate this.])] ) -AM_CONDITIONAL([HAVE_OBJCOPY], [test "x$OBJCOPY" != xno]) +AM_CONDITIONAL([HAVE_OBJCOPY], [test "x$OBJCOPY" != "x"]) # check for pgrep -AC_PATH_PROG([PGREP], [pgrep], [no]) -AM_CONDITIONAL([HAVE_PGREP], [test "x$PGREP" != "xno"]) +AC_PATH_PROG([PGREP], [pgrep]) +AM_CONDITIONAL([HAVE_PGREP], [test "x$PGREP" != "x"]) # set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file # is not distributed in tarballs @@ -90,7 +101,9 @@ detection. 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]) @@ -210,7 +223,7 @@ AC_CHECK_HEADERS([ \ signal.h stdlib.h sys/un.h sys/socket.h stdlib.h stdio.h \ getopt.h sys/ipc.h sys/shm.h popt.h grp.h arpa/inet.h \ netdb.h netinet/in.h paths.h stddef.h sys/file.h sys/ioctl.h \ - sys/mount.h sys/param.h sys/time.h elf.h + sys/mount.h sys/param.h sys/time.h elf.h sys/random.h sys/syscall.h ]) AM_CONDITIONAL([HAVE_ELF_H], [test x$ac_cv_header_elf_h = xyes]) @@ -222,7 +235,7 @@ AC_CHECK_FUNCS([ \ mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \ strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul \ strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \ - sched_getcpu sysconf sync_file_range + sched_getcpu sysconf sync_file_range getrandom flock ]) # Check if clock_gettime, timer_create, timer_settime, and timer_delete are available in lib rt, and if so, @@ -320,11 +333,17 @@ AC_ARG_ENABLE([test-java-agent-jul], ) AC_ARG_ENABLE([test-java-agent-log4j], - [AS_HELP_STRING([--enable-test-java-agent-log4j],[enable the LTTng UST Java agent Log4j tests [default=no]])], + [AS_HELP_STRING([--enable-test-java-agent-log4j],[enable the LTTng UST Java agent Log4j 1.x tests [default=no]])], [test_java_agent_log4j=$enableval], [test_java_agent_log4j=no] ) +AC_ARG_ENABLE([test-java-agent-log4j2], + [AS_HELP_STRING([--enable-test-java-agent-log4j2],[enable the LTTng UST Java agent Log4j 2.x tests [default=no]])], + [test_java_agent_log4j2=$enableval], + [test_java_agent_log4j2=no] +) + AC_ARG_ENABLE([test-java-agent-all], [AS_HELP_STRING([--enable-test-java-agent-all],[enable all the LTTng UST Java agent tests [default=no]])], [test_java_agent_jul=$enableval @@ -466,7 +485,7 @@ PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.7.6]) 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], [], @@ -483,7 +502,7 @@ AC_CHECK_DECL([rcu_thread_online], [], [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include ]]) AC_CHECK_DECL([caa_likely], [], [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include ]]) -AC_CHECK_LIB([urcu-cds], [_cds_lfht_new], [], +AC_CHECK_LIB([urcu-cds], [_cds_lfht_new], [:], [AC_MSG_ERROR([WRONG_LIBURCU_MSG])]) #Function added in urcu 0.7.0 @@ -491,9 +510,9 @@ AC_CHECK_DECL([cmm_smp_mb__before_uatomic_or], [], [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include ]] ) -#Function added in urcu 0.9.0 -AC_CHECK_DECL([urcu_ref_get_unless_zero], [], - [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include ]] +#Function added in urcu 0.11.0 +AC_CHECK_DECL([urcu_memb_barrier], [], + [AC_MSG_ERROR([WRONG_LIBURCU_MSG])], [[#include ]] ) # Check for libkmod, it will be auto-neabled if found but won't fail if it's not, @@ -567,7 +586,7 @@ AM_CONDITIONAL([LTTNG_TOOLS_BUILD_WITH_LIBPFM], [test "x$have_libpfm" = "xyes"]) 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]) @@ -584,9 +603,9 @@ if test "x$enable_python_binding" = xyes; then AS_IF([test -z "$PYTHON_CONFIG"], [ AC_PATH_PROGS([PYTHON_CONFIG], [python$PYTHON_VERSION-config python-config], - [no], + [], [`dirname $PYTHON`]) - AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])]) + AS_IF([test "x$PYTHON_CONFIG" = "x"], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])]) ]) AC_MSG_CHECKING([python include flags]) PYTHON_INCLUDE=`$PYTHON_CONFIG --includes` @@ -624,8 +643,9 @@ AM_CONDITIONAL([COMPAT_DIRFD], [ test "$enable_dirfd" = "yes" ]) AM_CONDITIONAL([TEST_JAVA_JUL_AGENT], [test "x$test_java_agent_jul" = "xyes"]) AM_CONDITIONAL([TEST_JAVA_LOG4J_AGENT], [test "x$test_java_agent_log4j" = "xyes"]) +AM_CONDITIONAL([TEST_JAVA_LOG4J2_AGENT], [test "x$test_java_agent_log4j2" = "xyes"]) -if test "x$test_java_agent_jul" = "xyes" || test "x$test_java_agent_log4j" = "xyes"; then +if test "x$test_java_agent_jul" = "xyes" || test "x$test_java_agent_log4j" = "xyes" || test "x$test_java_agent_log4j2" = "xyes"; then AX_JAVA_OPTIONS AX_PROG_JAVAC AX_PROG_JAVA @@ -660,6 +680,21 @@ if test "x$test_java_agent_jul" = "xyes" || test "x$test_java_agent_log4j" = "xy AC_MSG_ERROR([The Log4j class was not found. Please specify the location of the jar via the Java CLASSPATH e.g: export CLASSPATH="/path/to/log4j.jar"]) fi fi + + if test "x$test_java_agent_log4j2" = "xyes"; then + # Check for Log4j2 agent class + AX_CHECK_CLASS(org.lttng.ust.agent.log4j2.LttngLogAppender) + if test "x$ac_cv_class_org_lttng_ust_agent_log4j2_LttngLogAppender" = "xno"; then + AC_MSG_ERROR([The UST Java agent Log4j 2.x class was not found. Please specify the location of the jar via the Java CLASSPATH e.g: export CLASSPATH="/path/to/lttng-ust-agent-log4j2.jar"]) + fi + + # Check for Log4j 2.x classes + AX_CHECK_CLASS([org.apache.logging.log4j.Logger]) + AX_CHECK_CLASS([org.apache.logging.log4j.core.Core]) + if test "x$ac_cv_class_org_apache_logging_log4j_Logger" = "xno" || test "x$ac_cv_class_org_apache_logging_log4j_core_Core" = "xno"; then + AC_MSG_ERROR([The Log4j 2.x API or core class was not found. Please specify the location of the jars via the Java CLASSPATH e.g: export CLASSPATH="/path/to/log4j-core.jar:/path/to/log4j-api.jar"]) + fi + fi fi # enable building man pages (user's intention) @@ -678,10 +713,10 @@ have_asciidoc_xmlto=no warn_prebuilt_man_pages=no AS_IF([test "x$man_pages_opt" = "xyes"], [ - AC_PATH_PROG([ASCIIDOC], [asciidoc], [no]) - AC_PATH_PROG([XMLTO], [xmlto], [no]) + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + AC_PATH_PROG([XMLTO], [xmlto]) - AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [ + AS_IF([test "x$ASCIIDOC" = "x" || test "x$XMLTO" = "x"], [ 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, @@ -724,8 +759,8 @@ AS_IF([test "x$embedded_help" = "xyes"], [ AS_IF([test "x$man_pages_opt" = "xno"], [ AC_MSG_ERROR([You need the --enable-man-pages option with the --enable-embedded-help option.]) ]) - AC_PATH_PROG([man_prog_path], [man], [no]) - AS_IF([test "x$man_prog_path" = "xno"], [ + AC_PATH_PROG([man_prog_path], [man]) + AS_IF([test "x$man_prog_path" = "x"], [ AC_MSG_ERROR([You need man with the --enable-embedded-help option.]) ]) AC_DEFINE_UNQUOTED([LTTNG_EMBED_HELP], 1, [Embed --help messages.]) @@ -1059,6 +1094,10 @@ AM_CONDITIONAL([BUILD_LIB_UST_CONSUMER], [test x$build_lib_ust_consumer = xyes]) 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. @@ -1170,6 +1209,7 @@ AC_CONFIG_FILES([ tests/regression/ust/ust-dl/Makefile tests/regression/ust/java-jul/Makefile tests/regression/ust/java-log4j/Makefile + tests/regression/ust/java-log4j2/Makefile tests/regression/ust/python-logging/Makefile tests/regression/ust/getcpu-override/Makefile tests/regression/ust/clock-override/Makefile @@ -1286,9 +1326,13 @@ AS_IF([test "x$build_tests" = "xno"],[ test "x$test_java_agent_jul" = "xyes" && value=1 || value=0 PPRINT_PROP_BOOL([LTTng-UST Java agent JUL tests], $value) -# LTTng UST Java agent Log4j tests enabled/disabled +# LTTng UST Java agent Log4j 1.x tests enabled/disabled test "x$test_java_agent_log4j" = "xyes" && value=1 || value=0 -PPRINT_PROP_BOOL([LTTng-UST Java agent Log4j tests], $value) +PPRINT_PROP_BOOL([LTTng-UST Java agent Log4j 1.x tests], $value) + +# LTTng UST Java agent Log4j 2.x tests enabled/disabled +test "x$test_java_agent_log4j2" = "xyes" && value=1 || value=0 +PPRINT_PROP_BOOL([LTTng-UST Java agent Log4j 2.x tests], $value) test ! -z "$PYTHON2_AGENT" && value=1 || value=0 PPRINT_PROP_BOOL([LTTng-UST Python2 agent tests], $value) @@ -1296,9 +1340,9 @@ PPRINT_PROP_BOOL([LTTng-UST Python2 agent tests], $value) 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