X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=configure.ac;h=04dbb859008c102f0facdff0321fbec60ca2186b;hp=954ffb493e3149eda02bd30d1addf101f9a861bb;hb=refs%2Fheads%2Fstable-2.9.9-backport-rev9;hpb=76ca924ee04893a4d565fa26cf4c6cd3537db496 diff --git a/configure.ac b/configure.ac index 954ffb493..04dbb8590 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.64]) -AC_INIT([lttng-tools],[2.9.3],[jeremie.galarneau@efficios.com],[],[https://lttng.org]) +AC_INIT([lttng-tools],[2.9.10],[jeremie.galarneau@efficios.com],[],[https://lttng.org]) AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_AUX_DIR([config]) @@ -8,7 +8,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_TARGET AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax]) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax nostdinc]) AM_MAINTAINER_MODE([enable]) # Enable silent rules if available (Introduced in AM 1.11) @@ -59,9 +59,6 @@ AS_IF([test "x$ax_cv___attribute__" = "xyes"], [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])]) AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])]) -LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -CC="$PTHREAD_CC" AX_LIB_SOCKET_NSL @@ -141,6 +138,30 @@ AC_CHECK_FUNCS([ \ # add -lrt to LIBS AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete]) +# Checks for dl. +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]) + HAVE_DLMOPEN=1 +], [ + HAVE_DLMOPEN=0 +]) +AC_SUBST(HAVE_DLMOPEN) + # Babeltrace viewer check AC_ARG_WITH([babeltrace-bin], AS_HELP_STRING([--with-babeltrace-bin], @@ -297,8 +318,8 @@ _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_SNAPSHOT], [Snapshot buffers of current t _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_START], [Start tracing]) _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_STATUS], [Get the status of the current tracing session]) _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_STOP], [Stop tracing]) -_AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_TRACK], [Track specific system resources]) -_AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_UNTRACK], [Untrack specific system resources]) +_AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_TRACK], [Track specific processes]) +_AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_UNTRACK], [Untrack specific processes]) _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_VERSION], [Show version information]) _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_VIEW], [Start trace viewer]) @@ -412,7 +433,7 @@ AC_ARG_WITH(kmod-prefix, [Specify the installation prefix of the kmod library. Headers must be in PATH/include; libraries in PATH/lib.]), [ - CPPFLAGS="$CPPFLAGS -I${withval}/include" + AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib" ]) @@ -437,7 +458,7 @@ AC_ARG_WITH(lttng-ust-prefix, [Specify the installation prefix of the lttng-ust library. Headers must be in PATH/include; libraries in PATH/lib.]), [ - CPPFLAGS="$CPPFLAGS -I${withval}/include" + AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib" ]) @@ -498,15 +519,6 @@ AC_CHECK_LIB([pfm], [pfm_initialize], ]) AM_CONDITIONAL([LTTNG_TOOLS_BUILD_WITH_LIBPFM], [test "x$have_libpfm" = "xyes"]) -AC_ARG_ENABLE([git-version], - [AC_HELP_STRING([--disable-git-version], - [Do not use the git version for the build])], - [have_git_version=$enableval], [have_git_version=yes] -) - -AM_CONDITIONAL([LTTNG_TOOLS_BUILD_GIT_SOURCE], - [test "x${have_git_version}" = "xyes"]) - # For Python # SWIG version needed or newer: swig_version=2.0.0 @@ -943,9 +955,17 @@ modify their sources. # export flex condition AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"]) -CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing" +AM_CFLAGS="-Wall -fno-strict-aliasing $PTHREAD_CFLAGS" +AC_SUBST(AM_CFLAGS) -DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include -include config.h" +# 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" @@ -980,6 +1000,7 @@ AC_CONFIG_FILES([ src/common/index/Makefile src/common/health/Makefile src/common/config/Makefile + src/common/fd-tracker/Makefile src/lib/Makefile src/lib/lttng-ctl/Makefile src/lib/lttng-ctl/filter/Makefile @@ -1009,6 +1030,8 @@ AC_CONFIG_FILES([ tests/regression/tools/crash/Makefile tests/regression/tools/regen-metadata/Makefile tests/regression/tools/regen-statedump/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 @@ -1049,6 +1072,7 @@ AC_CONFIG_FILES([ AC_CONFIG_FILES([tests/regression/ust/python-logging/test_python_logging],[chmod +x tests/regression/ust/python-logging/test_python_logging]) # Inject LTTNG_TOOLS_BUILD_WITH_LIBPFM variable in test script. AC_CONFIG_FILES([tests/perf/test_perf_raw],[chmod +x tests/perf/test_perf_raw]) +AC_CONFIG_FILES([tests/regression/ust/ust-dl/test_ust-dl],[chmod +x tests/regression/ust/ust-dl/test_ust-dl]) AC_OUTPUT