|
Packit |
c04fcb |
dnl -*- Autoconf -*-
|
|
Packit |
c04fcb |
dnl Process this file with autoconf to produce a configure script.
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
dnl Version infos
|
|
Packit |
c04fcb |
m4_define([V_MAJOR], [2])
|
|
Packit |
c04fcb |
m4_define([V_MINOR], [8])
|
|
Packit |
c04fcb |
m4_define([V_PATCH], [1])
|
|
Packit |
c04fcb |
dnl m4_define([V_EXTRA], [])
|
|
Packit |
c04fcb |
m4_define([V_STRING], [V_MAJOR.V_MINOR.V_PATCH])
|
|
Packit |
c04fcb |
m4_ifdef([V_EXTRA], [m4_append([V_STRING], [-V_EXTRA])])
|
|
Packit |
c04fcb |
m4_define([V_NAME], [[Isseki Nicho]])
|
|
Packit |
c04fcb |
m4_define([V_DESC], [[The result of a collaboration between "Dieu du Ciel!" and Nagano-based "Shiga Kogen", Isseki Nicho is a strong Imperial Dark Saison offering a rich roasted malt flavor combined with a complex fruity finish typical of Saison yeasts.]])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_INIT([lttng-ust], V_STRING, [mathieu dot desnoyers at efficios dot com])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Following the numbering scheme proposed by libtool for the library version
|
|
Packit |
c04fcb |
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
|
Packit |
c04fcb |
# This is the library version of liblttng-ust.
|
|
Packit |
c04fcb |
AC_SUBST([LTTNG_UST_LIBRARY_VERSION], [0:0:0])
|
|
Packit |
c04fcb |
# note: remember to update tracepoint.h dlopen() to match this version
|
|
Packit |
c04fcb |
# number. TODO: eventually automate by exporting the major number.
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# This is the library version of liblttng-ust-ctl, used internally by
|
|
Packit |
c04fcb |
# liblttng-ust, lttng-sessiond, and lttng-consumerd.
|
|
Packit |
c04fcb |
AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], [2:0:0])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_CONFIG_AUX_DIR([config])
|
|
Packit |
c04fcb |
AC_CANONICAL_TARGET
|
|
Packit |
c04fcb |
AC_CANONICAL_HOST
|
|
Packit |
c04fcb |
AC_CONFIG_MACRO_DIR([config])
|
|
Packit |
c04fcb |
AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip tar-ustar])
|
|
Packit |
c04fcb |
AM_MAINTAINER_MODE([enable])
|
|
Packit |
c04fcb |
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
Packit |
c04fcb |
AC_CONFIG_SRCDIR([include/lttng/tracepoint.h])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Configuration options, which will be installed in the config.h
|
|
Packit |
c04fcb |
AC_CONFIG_HEADERS([config.h include/lttng/ust-config.h])
|
|
Packit |
c04fcb |
AH_TEMPLATE([LTTNG_UST_HAVE_EFFICIENT_UNALIGNED_ACCESS], [Use efficient unaligned access.])
|
|
Packit |
c04fcb |
AH_TEMPLATE([LTTNG_UST_HAVE_SDT_INTEGRATION], [SystemTap integration via sdt.h])
|
|
Packit |
c04fcb |
AH_TEMPLATE([LTTNG_UST_HAVE_PERF_EVENT], [Perf event integration via perf_event.h])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
dnl Substitute minor/major/patchlevel version numbers
|
|
Packit |
c04fcb |
AC_SUBST([MAJOR_VERSION], [V_MAJOR])
|
|
Packit |
c04fcb |
AC_SUBST([MINOR_VERSION], [V_MINOR])
|
|
Packit |
c04fcb |
AC_SUBST([PATCHLEVEL_VERSION], [V_PATCH])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_PROG_SED
|
|
Packit |
c04fcb |
AC_PROG_GREP
|
|
Packit |
c04fcb |
AC_PROG_LN_S
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# libtool link_all_deplibs fixup. See http://bugs.lttng.org/issues/321.
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([libtool-linkdep-fixup], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--disable-libtool-linkdep-fixup], [disable the libtool fixup for linking all dependent libraries (link_all_deplibs)])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
libtool_fixup=$enableval
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
libtool_fixup=yes
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$libtool_fixup" = "xyes"], [
|
|
Packit |
c04fcb |
libtool_m4="$srcdir/config/libtool.m4"
|
|
Packit |
c04fcb |
libtool_flag_pattern=".*link_all_deplibs\s*,\s*\$1\s*)"
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([for occurence(s) of link_all_deplibs = no in $libtool_m4])
|
|
Packit |
c04fcb |
libtool_flag_pattern_count=$(grep -c "$libtool_flag_pattern\s*=\s*no" $libtool_m4)
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test $libtool_flag_pattern_count -ne 0], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([$libtool_flag_pattern_count])
|
|
Packit |
c04fcb |
AC_MSG_WARN([the detected libtool will not link all dependencies, forcing link_all_deplibs = unknown])
|
|
Packit |
c04fcb |
sed -i "s/\($libtool_flag_pattern\)\s*=\s*no/\1=unknown/g" $libtool_m4
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([none])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([NO_SHARED], [test "x$enable_shared" = "xno"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Checks for programs.
|
|
Packit |
c04fcb |
AC_PROG_CC
|
|
Packit |
c04fcb |
AC_PROG_CXX
|
|
Packit |
c04fcb |
AC_PROG_MAKE_SET
|
|
Packit |
c04fcb |
LT_INIT
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# rw_PROG_CXX_WORKS
|
|
Packit |
c04fcb |
# Check whether the C++ compiler works.
|
|
Packit |
c04fcb |
AC_CACHE_CHECK([whether the C++ compiler works], [rw_cv_prog_cxx_works], [
|
|
Packit |
c04fcb |
AC_LANG_PUSH([C++])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
|
Packit |
c04fcb |
check_cxx_designated_initializers=yes
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
rw_cv_prog_cxx_works=no
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$check_cxx_designated_initializers" = "xyes"], [
|
|
Packit |
c04fcb |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c04fcb |
struct foo { int a; int b; };
|
|
Packit |
c04fcb |
void fct(void)
|
|
Packit |
c04fcb |
{
|
|
Packit |
c04fcb |
struct foo f = { .a = 0, .b = 1 };
|
|
Packit |
c04fcb |
}
|
|
Packit |
c04fcb |
]])], [
|
|
Packit |
c04fcb |
rw_cv_prog_cxx_works=yes
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
rw_cv_prog_cxx_works=no
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_LANG_POP([C++])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Check if the compiler support weak symbols
|
|
Packit |
c04fcb |
AX_SYS_WEAK_ALIAS
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x${ax_cv_sys_weak_alias}" = "xno"], [
|
|
Packit |
c04fcb |
AC_MSG_ERROR([Your platform doesn't support weak symbols.])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Checks for libraries.
|
|
Packit |
c04fcb |
AC_CHECK_LIB([dl], [dlopen], [
|
|
Packit |
c04fcb |
have_libdl=yes
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
#libdl not found, check for dlopen in libc.
|
|
Packit |
c04fcb |
AC_CHECK_LIB([c], [dlopen], [
|
|
Packit |
c04fcb |
have_libc_dl=yes
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBDL], [test "x$have_libdl" = "xyes"])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_CHECK_LIB([pthread], [pthread_create])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Check for dlfcn.h
|
|
Packit |
c04fcb |
AC_CHECK_HEADER([dlfcn.h])
|
|
Packit |
c04fcb |
AS_IF([test "x${ac_cv_header_dlfcn_h}" = "xyes"], [
|
|
Packit |
c04fcb |
AC_CHECK_DECLS([RTLD_DI_LINKMAP], [], [], [
|
|
Packit |
c04fcb |
#define _GNU_SOURCE /* Required on Linux to get GNU extensions */
|
|
Packit |
c04fcb |
#include <dlfcn.h>
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
ac_cv_have_decl_RTLD_DI_LINKMAP="no"
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([HAVE_DLINFO], [test "x${ac_cv_have_decl_RTLD_DI_LINKMAP}" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Checks for header files.
|
|
Packit |
c04fcb |
dnl AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Checks for typedefs, structures, and compiler characteristics.
|
|
Packit |
c04fcb |
AC_C_INLINE
|
|
Packit |
c04fcb |
dnl AC_TYPE_INT16_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_INT32_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_INT64_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_INT8_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_PID_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_SIZE_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_SSIZE_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_UINT16_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_UINT32_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_UINT64_T
|
|
Packit |
c04fcb |
dnl AC_TYPE_UINT8_T
|
|
Packit |
c04fcb |
dnl AC_CHECK_TYPES([ptrdiff_t])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Checks for library functions.
|
|
Packit |
c04fcb |
AC_FUNC_MALLOC
|
|
Packit |
c04fcb |
AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol sched_getcpu sysconf])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
CFLAGS="-Wall $CFLAGS"
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# URCU
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# urcu - check if we just find the headers it out of the box.
|
|
Packit |
c04fcb |
AC_CHECK_HEADERS([urcu-bp.h], [], [AC_MSG_ERROR([Cannot find [URCU] headers (urcu-bp.h). Use [CPPFLAGS]=-Idir to specify their location.
|
|
Packit |
c04fcb |
This error can also occur when the liburcu package's configure script has not been run.])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# urcu-cds - check that URCU Concurrent Data Structure lib is available to compilation
|
|
Packit |
c04fcb |
# Part of Userspace RCU library 0.7.2 or better.
|
|
Packit |
c04fcb |
AC_CHECK_LIB([urcu-cds], [_cds_lfht_new], [], [AC_MSG_ERROR([Cannot find
|
|
Packit |
c04fcb |
liburcu-cds lib, part of Userspace RCU 0.7 or better. Use [LDFLAGS]=-Ldir to specify its location.])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([caa_likely()])
|
|
Packit |
c04fcb |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c04fcb |
#include <urcu/compiler.h>
|
|
Packit |
c04fcb |
void fct(void)
|
|
Packit |
c04fcb |
{
|
|
Packit |
c04fcb |
if (caa_likely(1)) {
|
|
Packit |
c04fcb |
}
|
|
Packit |
c04fcb |
}
|
|
Packit |
c04fcb |
]])], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([yes])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([no])
|
|
Packit |
c04fcb |
AC_MSG_ERROR([Please upgrade your version of liburcu to 0.6.6 or better])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# urcu - check that URCU lib is available to compilation
|
|
Packit |
c04fcb |
AC_CHECK_LIB([urcu-bp], [synchronize_rcu_bp], [], [AC_MSG_ERROR([Cannot find liburcu-bp lib. Use [LDFLAGS]=-Ldir to specify its location.])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# urcu - check that URCU lib is at least version 0.6
|
|
Packit |
c04fcb |
AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [], [AC_MSG_ERROR([liburcu 0.6 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# optional linux/perf_event.h
|
|
Packit |
c04fcb |
AC_CHECK_HEADERS([linux/perf_event.h], [have_perf_event=yes], [])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Perf event counters are only supported on x86 so far.
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([UST support for architecture perf event counters])
|
|
Packit |
c04fcb |
AS_CASE([$host_cpu],
|
|
Packit |
c04fcb |
[i[[3456]]86], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
|
|
Packit |
c04fcb |
[x86_64], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
|
|
Packit |
c04fcb |
[amd64], [UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=yes],
|
|
Packit |
c04fcb |
[UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS=no])
|
|
Packit |
c04fcb |
AC_MSG_RESULT([$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([HAVE_PERF_EVENT], [test "x$have_perf_event" = "xyes" && test "x$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$have_perf_event" = "xyes" && test "x$UST_SUPPORT_FOR_ARCH_PERF_EVENT_COUNTERS" = "xyes"], [
|
|
Packit |
c04fcb |
AC_DEFINE([LTTNG_UST_HAVE_PERF_EVENT], [1])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([host system alignment requirements])
|
|
Packit |
c04fcb |
AS_CASE([$host_cpu],
|
|
Packit |
c04fcb |
[i[[3456]]86], [],
|
|
Packit |
c04fcb |
[x86_64], [],
|
|
Packit |
c04fcb |
[amd64], [],
|
|
Packit |
c04fcb |
[powerpc], [],
|
|
Packit |
c04fcb |
[ppc64], [],
|
|
Packit |
c04fcb |
[ppc64le], [],
|
|
Packit |
c04fcb |
[powerpc64], [],
|
|
Packit |
c04fcb |
[powerpc64le], [],
|
|
Packit |
c04fcb |
[s390], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[s390x], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[arm*], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[aarch64*], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[mips*], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[tile*], [NO_UNALIGNED_ACCESS=1],
|
|
Packit |
c04fcb |
[
|
|
Packit |
c04fcb |
UNSUPPORTED_ARCH=1
|
|
Packit |
c04fcb |
NO_UNALIGNED_ACCESS=1
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
AC_MSG_RESULT([$host_cpu])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$NO_UNALIGNED_ACCESS" = "x"], [
|
|
Packit |
c04fcb |
AC_DEFINE([LTTNG_UST_HAVE_EFFICIENT_UNALIGNED_ACCESS], [1])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Check for JNI header files if requested
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([jni-interface], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--enable-jni-interface], [build JNI interface between C and Java. Needs Java include files [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
jni_interface=$enableval
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
jni_interface=no
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_JNI_INTERFACE], [test "x$jni_interface" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([java-agent-jul], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--enable-java-agent-jul], [build the LTTng UST Java agent with JUL support [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
java_agent_jul=$enableval
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
java_agent_jul=no
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([java-agent-log4j], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--enable-java-agent-log4j], [build the LTTng UST Java agent with Log4j support [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
java_agent_log4j=$enableval
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
java_agent_log4j=no
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([java-agent-all], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--enable-java-agent-all], [build the LTTng UST Java agent with all supported backends [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
java_agent_jul=$enableval
|
|
Packit |
c04fcb |
java_agent_log4j=$enableval
|
|
Packit |
c04fcb |
], [:])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_JAVA_AGENT], [test "x$java_agent_jul" = "xyes" || test "x$java_agent_log4j" = "xyes"])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_JAVA_AGENT_WITH_JUL], [test "x$java_agent_jul" = "xyes"])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_JAVA_AGENT_WITH_LOG4J], [test "x$java_agent_log4j" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$jni_interface" = "xyes" || test "x$java_agent_jul" = "xyes" || test "x$java_agent_log4j" = "xyes"], [
|
|
Packit |
c04fcb |
AX_JAVA_OPTIONS
|
|
Packit |
c04fcb |
AX_PROG_JAVAC
|
|
Packit |
c04fcb |
AX_PROG_JAVA
|
|
Packit |
c04fcb |
AX_PROG_JAR
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AX_JNI_INCLUDE_DIR
|
|
Packit |
c04fcb |
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
|
|
Packit |
c04fcb |
do
|
|
Packit |
c04fcb |
CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
|
|
Packit |
c04fcb |
done
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AX_PROG_JAVAH
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$java_agent_log4j" = "xyes"], [
|
|
Packit |
c04fcb |
AX_CHECK_CLASSPATH
|
|
Packit |
c04fcb |
AX_CHECK_CLASS([org.apache.log4j.Logger])
|
|
Packit |
c04fcb |
AS_IF([test "x$ac_cv_class_org_apache_log4j_Logger" = "xno"], [
|
|
Packit |
c04fcb |
AC_MSG_ERROR([The UST Java agent support for log4j was requested but the Log4j classes were not found. Please specify the location of the Log4j jar via the Java CLASSPATH e.g: export CLASSPATH="/path/to/log4j.jar"])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Option to build the python agent
|
|
Packit |
c04fcb |
AC_ARG_ENABLE([python-agent], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--enable-python-agent], [build the LTTng UST Python agent [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
python_agent=$enableval
|
|
Packit |
c04fcb |
], [:])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_PYTHON_AGENT], [test "x$python_agent" = "xyes"])
|
|
Packit |
c04fcb |
AS_IF([test "x$python_agent" = "xyes"], [
|
|
Packit |
c04fcb |
AM_PATH_PYTHON([2.7])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# sdt.h integration
|
|
Packit |
c04fcb |
AC_ARG_WITH([sdt], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--with-sdt], [provide SystemTap integration via sdt.h [default=no]])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
with_sdt=$withval
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
with_sdt="no"
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$with_sdt" = "xyes"], [
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([STAP_PROBEV()])
|
|
Packit |
c04fcb |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c04fcb |
#define SDT_USE_VARIADIC
|
|
Packit |
c04fcb |
#include <sys/sdt.h>
|
|
Packit |
c04fcb |
void fct(void)
|
|
Packit |
c04fcb |
{
|
|
Packit |
c04fcb |
STAP_PROBEV(provider,name,1,2,3,4,5,6,7,8,9,10);
|
|
Packit |
c04fcb |
}
|
|
Packit |
c04fcb |
]])], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([yes])
|
|
Packit |
c04fcb |
AC_DEFINE([LTTNG_UST_HAVE_SDT_INTEGRATION], [1])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([no])
|
|
Packit |
c04fcb |
AC_MSG_ERROR([The sdt.h integration was requested but the STAP_PROBEV define cannot be used. Make sure it is installed, and up to date, or use CPPFLAGS=-I/path/ to specify a non-standard path to sys/sdt.h])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_MSG_CHECKING([whether shared libraries are enabled])
|
|
Packit |
c04fcb |
AS_IF([test "x$enable_shared" = "xyes"], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([yes])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
AC_MSG_RESULT([no])
|
|
Packit |
c04fcb |
AC_MSG_ERROR([LTTng-UST requires shared libraries to be enabled])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_ARG_WITH([lttng-system-rundir], [
|
|
Packit |
c04fcb |
AS_HELP_STRING([--with-lttng-system-rundir], [Location of the system directory where LTTng-UST expects the system-wide lttng-sessiond runtime files. The default is "/var/run/lttng".]),
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
lttng_system_rundir="$withval"
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
lttng_system_rundir="/var/run/lttng"
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
|
|
Packit |
c04fcb |
[LTTng system runtime directory])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_CHECK_PROG([BUILD_GEN_TP_EXAMPLES], [python], ["yes"])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test "x$BUILD_GEN_TP_EXAMPLES" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file
|
|
Packit |
c04fcb |
# is not distributed in tarballs.
|
|
Packit |
c04fcb |
AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Enable building man pages (user's intention).
|
|
Packit |
c04fcb |
AC_ARG_ENABLE(
|
|
Packit |
c04fcb |
man-pages,
|
|
Packit |
c04fcb |
AS_HELP_STRING(
|
|
Packit |
c04fcb |
[--disable-man-pages],
|
|
Packit |
c04fcb |
[Do not build and install man pages (already built in a distributed tarball)]
|
|
Packit |
c04fcb |
),
|
|
Packit |
c04fcb |
[man_pages_opt=$enableval],
|
|
Packit |
c04fcb |
[man_pages_opt=yes]
|
|
Packit |
c04fcb |
)
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Check for asciidoc and xmlto if we enabled building the man pages.
|
|
Packit |
c04fcb |
have_asciidoc_xmlto=no
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$man_pages_opt" = "xyes"], [
|
|
Packit |
c04fcb |
AC_PATH_PROG([ASCIIDOC], [asciidoc], [no])
|
|
Packit |
c04fcb |
AC_PATH_PROG([XMLTO], [xmlto], [no])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [
|
|
Packit |
c04fcb |
AS_IF([test "x$in_git_repo" = "xyes"], [
|
|
Packit |
c04fcb |
# This is an error because we're in the Git repo, which
|
|
Packit |
c04fcb |
# means the man pages are not already generated for us,
|
|
Packit |
c04fcb |
# thus asciidoc/xmlto are required because we were asked
|
|
Packit |
c04fcb |
# to build the man pages.
|
|
Packit |
c04fcb |
AC_MSG_ERROR([
|
|
Packit |
c04fcb |
Both asciidoc and xmlto are needed to build the LTTng-UST man pages. Use
|
|
Packit |
c04fcb |
--disable-man-pages to disable building the man pages, in which case
|
|
Packit |
c04fcb |
they will not be installed.
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
# Only warn here: since we're in the tarball, the man
|
|
Packit |
c04fcb |
# pages should already be generated at this point, thus
|
|
Packit |
c04fcb |
# asciidoc/xmlto are not strictly required.
|
|
Packit |
c04fcb |
AC_MSG_WARN([
|
|
Packit |
c04fcb |
Both asciidoc and xmlto are needed to build the LTTng-UST man pages.
|
|
Packit |
c04fcb |
Note that the man pages are already built in this distribution tarball,
|
|
Packit |
c04fcb |
so asciidoc and xmlto are only needed if you intend to modify their
|
|
Packit |
c04fcb |
sources. Use --disable-man-pages to completely disable building
|
|
Packit |
c04fcb |
and installing the man pages.
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
], [
|
|
Packit |
c04fcb |
have_asciidoc_xmlto=yes
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Export man page build condition: build the man pages if the user
|
|
Packit |
c04fcb |
# asked for it, and if the tools are available.
|
|
Packit |
c04fcb |
AM_CONDITIONAL([MAN_PAGES_OPT], [test "x$man_pages_opt" != "xno"])
|
|
Packit |
c04fcb |
AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Default values
|
|
Packit |
c04fcb |
AC_DEFUN([_AC_DEFINE_AND_SUBST], [
|
|
Packit |
c04fcb |
AC_DEFINE_UNQUOTED([CONFIG_$1], [$2], [$1])
|
|
Packit |
c04fcb |
$1="$2"
|
|
Packit |
c04fcb |
AC_SUBST([$1])
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_CONFIG_FILES([
|
|
Packit |
c04fcb |
Makefile
|
|
Packit |
c04fcb |
doc/Makefile
|
|
Packit |
c04fcb |
doc/examples/Makefile
|
|
Packit |
c04fcb |
doc/man/Makefile
|
|
Packit |
c04fcb |
include/Makefile
|
|
Packit |
c04fcb |
include/lttng/ust-version.h
|
|
Packit |
c04fcb |
snprintf/Makefile
|
|
Packit |
c04fcb |
libringbuffer/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-comm/Makefile
|
|
Packit |
c04fcb |
liblttng-ust/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-ctl/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-fork/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-dl/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/java/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/java/lttng-ust-agent-all/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/java/lttng-ust-agent-common/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/java/lttng-ust-agent-jul/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/java/lttng-ust-agent-log4j/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/jni/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/jni/common/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/jni/jul/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-java-agent/jni/log4j/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-libc-wrapper/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-cyg-profile/Makefile
|
|
Packit |
c04fcb |
liblttng-ust-python-agent/Makefile
|
|
Packit |
c04fcb |
python-lttngust/Makefile
|
|
Packit |
c04fcb |
python-lttngust/setup.py
|
|
Packit |
c04fcb |
python-lttngust/lttngust/__init__.py
|
|
Packit |
c04fcb |
tools/Makefile
|
|
Packit |
c04fcb |
tests/Makefile
|
|
Packit |
c04fcb |
tests/ctf-types/Makefile
|
|
Packit |
c04fcb |
tests/hello/Makefile
|
|
Packit |
c04fcb |
tests/hello.cxx/Makefile
|
|
Packit |
c04fcb |
tests/same_line_tracepoint/Makefile
|
|
Packit |
c04fcb |
tests/snprintf/Makefile
|
|
Packit |
c04fcb |
tests/ust-elf/Makefile
|
|
Packit |
c04fcb |
tests/benchmark/Makefile
|
|
Packit |
c04fcb |
tests/utils/Makefile
|
|
Packit |
c04fcb |
tests/test-app-ctx/Makefile
|
|
Packit |
c04fcb |
tests/gcc-weak-hidden/Makefile
|
|
Packit |
c04fcb |
lttng-ust.pc
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Create link for python agent for the VPATH guru.
|
|
Packit |
c04fcb |
AC_CONFIG_LINKS([
|
|
Packit |
c04fcb |
python-lttngust/lttngust/agent.py:python-lttngust/lttngust/agent.py
|
|
Packit |
c04fcb |
python-lttngust/lttngust/cmd.py:python-lttngust/lttngust/cmd.py
|
|
Packit |
c04fcb |
python-lttngust/lttngust/debug.py:python-lttngust/lttngust/debug.py
|
|
Packit |
c04fcb |
python-lttngust/lttngust/loghandler.py:python-lttngust/lttngust/loghandler.py
|
|
Packit |
c04fcb |
])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AC_OUTPUT
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO
|
|
Packit |
c04fcb |
AS_ECHO(["m4_bpatsubst(V_NAME, ["], [\\"])"])
|
|
Packit |
c04fcb |
AS_ECHO
|
|
Packit |
c04fcb |
AS_ECHO(["m4_bpatsubst(V_DESC, ["], [\\"])"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
# Report on the configuration options
|
|
Packit |
c04fcb |
AS_ECHO
|
|
Packit |
c04fcb |
AS_ECHO(["LTTng-UST will be built with the following options:"])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO_N(["Java agent (JUL support): "])
|
|
Packit |
c04fcb |
AS_IF([test "x$java_agent_jul" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO_N(["Java agent (Log4j support): "])
|
|
Packit |
c04fcb |
AS_IF([test "x$java_agent_log4j" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO_N(["JNI interface (JNI): "])
|
|
Packit |
c04fcb |
AS_IF([test "x$jni_interface" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO_N(["Python ($PYTHON) agent: "])
|
|
Packit |
c04fcb |
AS_IF([test "x$python_agent" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO_N(["sdt.h integration: "])
|
|
Packit |
c04fcb |
AS_IF([test "x$with_sdt" = "xyes"], [AS_ECHO(["Enabled"])], [AS_ECHO(["Disabled"])])
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO(["Architecture: $host_cpu"])
|
|
Packit |
c04fcb |
AS_ECHO_N(["Efficient unaligned memory access: "])
|
|
Packit |
c04fcb |
AS_IF([test "x$NO_UNALIGNED_ACCESS" != "x1"], [AS_ECHO(["yes"])], [AS_IF([test "x$UNSUPPORTED_ARCH" != "x1"], [AS_ECHO(["no"])], [AS_ECHO(["unknown"])])])
|
|
Packit |
c04fcb |
AS_IF([test "x$UNSUPPORTED_ARCH" = "x1"], [AC_MSG_WARN([Your architecture ($host_cpu) is unsupported, using safe default of no unaligned access])])
|
|
Packit |
c04fcb |
AS_ECHO
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
AS_ECHO(["Type 'make' to compile."])
|
|
Packit |
c04fcb |
|