X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=e75ad55d0d531bd7111ef7f2ac39fd7d21962a94;hp=256b522274007ecba3f9aa1ba35443cebe4ee19a;hb=a9115ebf4fb48f4a0e81a97384c9ace7df219926;hpb=56e59b9b33595a94a1245382250c507bf951bbc3 diff --git a/configure.ac b/configure.ac index 256b52227..e75ad55d0 100644 --- a/configure.ac +++ b/configure.ac @@ -22,12 +22,9 @@ AC_SYS_LARGEFILE AC_PROG_CC AC_PROG_CC_STDC AC_PROG_CXX -rw_PROG_CXX_WORKS +RW_PROG_CXX_WORKS AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) -LTTNG_CHECK_SDT_WORKS -AM_CONDITIONAL([SDT_WORKS], [test "x$lttng_cv_sdt_works" = "xyes"]) - # Checks for programs. AC_PROG_GREP AC_PROG_MAKE_SET @@ -425,7 +422,7 @@ CONFDIR=`eval echo $sysconfdir` AC_SUBST(CONFDIR) AC_DEFINE_UNQUOTED([CONFIG_LTTNG_SYSTEM_CONFIGDIR],"$CONFDIR", [LTTng system configuration directory.]) -AC_DEFINE_DIR([CONFIG_LTTNG_SYSTEM_DATADIR],[datadir], [LTTng system data directory.]) +AX_DEFINE_DIR([CONFIG_LTTNG_SYSTEM_DATADIR], [datadir], [LTTng system data directory.]) # Check libpopt PKG_CHECK_MODULES([POPT], [popt], @@ -560,19 +557,18 @@ AC_ARG_WITH([lttng-ust], [with_lttng_ust=yes] ) -AS_IF([test "x$with_lttng_ust" = "xyes"], - [ - AC_CHECK_LIB([lttng-ust-ctl], [ustctl_recv_channel_from_consumer], - [ - AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) - ], - [ - AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.2.x. Use [LDFLAGS]=-Ldir and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust to build lttng-tools without LTTng-UST support.]) - ], - [-lurcu-common -lurcu-bp -lurcu-cds -lrt -ldl] - ) - ] -) +AS_IF([test "x$with_lttng_ust" = "xyes"], [ + AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) + + # Check for liblttng-ust + PKG_CHECK_MODULES([UST], [lttng-ust >= $major_version.$minor_version]) + + # Check for liblttng-ust-ctl + PKG_CHECK_MODULES([UST_CTL], [lttng-ust-ctl >= $major_version.$minor_version]) + + AM_CPPFLAGS="$AM_CPPFLAGS $UST_CFLAGS" +]) + AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$with_lttng_ust" = "xyes"]) @@ -858,6 +854,36 @@ AC_SUBST([RUN_PYTHON_AGENT_TEST]) AC_SUBST([PYTHON2_AGENT]) AC_SUBST([PYTHON3_AGENT]) +AC_ARG_ENABLE([test-sdt-uprobe], + [AS_HELP_STRING([--enable-test-sdt-uprobe], [enable the LTTng UST SDT uprobe tests [default=autodetect]])], + [test_sdt_uprobe="$enableval"], + [test_sdt_uprobe=autodetect] +) + +AS_IF([test "$test_sdt_uprobe" != "no"], [ + LTTNG_CHECK_SDT_WORKS + AC_PATH_PROG([DTRACE], [dtrace]) +]) + +AS_IF([test "$test_sdt_uprobe" = "yes"], [ + AS_IF([test "$lttng_cv_sdt_works" = "no"], [ + AC_MSG_ERROR([Cannot find 'sys/sdt.h'.]) + ]) + AS_IF([test "x$DTRACE" = "x"], [ + AC_MSG_ERROR([Cannot find SystemTap dtrace. You can set the DTRACE variable to override automatic detection.]) + ]) +]) + +AS_IF([test "$test_sdt_uprobe" = "autodetect"], [ + AS_IF([test "$lttng_cv_sdt_works" = "yes"], [ + AS_IF([test "x$DTRACE" != "x"], [ + test_sdt_uprobe=yes + ]) + ]) +]) + +AM_CONDITIONAL([TEST_SDT_UPROBE], [test "$test_sdt_uprobe" = "yes"]) + # Arguments for binaries build exclusion AC_ARG_ENABLE([bin-lttng], AS_HELP_STRING([--disable-bin-lttng],[Disable the build of lttng binaries])) AC_ARG_ENABLE([bin-lttng-consumerd], AS_HELP_STRING([--disable-bin-lttng-consumerd], @@ -1054,7 +1080,13 @@ AM_CONDITIONAL([BUILD_LIB_UST_CONSUMER], [test x$build_lib_ust_consumer = xyes]) AM_CFLAGS="-Wall -fno-strict-aliasing $PTHREAD_CFLAGS" AC_SUBST(AM_CFLAGS) -AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS" +# 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. +# In a scenario where lttng-tools is built from a distribution tarball and in a +# out-of-tree manner, the generated "version.i" has priority on the one from +# the source (distribution tarball) and must be found first. +AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS" AC_SUBST(AM_CPPFLAGS) lttngincludedir="${includedir}/lttng" @@ -1132,6 +1164,10 @@ AC_CONFIG_FILES([ tests/regression/tools/regen-statedump/Makefile tests/regression/tools/notification/Makefile tests/regression/tools/rotation/Makefile + tests/regression/tools/base-path/Makefile + tests/regression/tools/metadata/Makefile + tests/regression/tools/working-directory/Makefile + tests/regression/tools/relayd-grouping/Makefile tests/regression/ust/Makefile tests/regression/ust/nprocesses/Makefile tests/regression/ust/high-throughput/Makefile @@ -1158,6 +1194,7 @@ AC_CONFIG_FILES([ tests/regression/ust/type-declarations/Makefile tests/regression/ust/rotation-destroy-flush/Makefile tests/regression/ust/blocking/Makefile + tests/regression/ust/namespaces/Makefile tests/stress/Makefile tests/unit/Makefile tests/unit/ini_config/Makefile @@ -1165,7 +1202,9 @@ AC_CONFIG_FILES([ tests/utils/Makefile tests/utils/tap/Makefile tests/utils/testapp/Makefile + tests/utils/testapp/gen-ns-events/Makefile tests/utils/testapp/gen-ust-events/Makefile + tests/utils/testapp/gen-ust-events-ns/Makefile tests/utils/testapp/gen-syscall-events-callstack/Makefile tests/utils/testapp/gen-ust-nevents/Makefile tests/utils/testapp/gen-ust-nevents-str/Makefile @@ -1274,6 +1313,10 @@ 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 +test "x$test_sdt_uprobe" = "xyes" && value=1 || value=0 +PPRINT_PROP_BOOL([LTTng-UST SDT uprobe tests], $value) + #Python binding enabled/disabled test "x$enable_python_binding" = xyes && value=1 || value=0 AS_ECHO