1 AC_INIT([lttng-tools], [2.0-pre14], [david.goulet@polymtl.ca], ,[http://lttng.org])
2 AC_CONFIG_AUX_DIR([config])
5 AC_CONFIG_MACRO_DIR([config])
6 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9 AC_CONFIG_HEADERS([include/config.h])
12 sys/types.h unistd.h fcntl.h string.h pthread.h limits.h \
13 signal.h stdlib.h sys/un.h sys/socket.h stdlib.h stdio.h \
14 getopt.h sys/ipc.h sys/shm.h popt.h grp.h \
17 AC_ARG_VAR([LTTNG_TOOLS_32BIT_BINDIR], [Search for LTTng Tools 32-bit binaries in this location.])
18 AC_DEFINE_UNQUOTED([CONFIG_32BIT_BINDIR], $LTTNG_TOOLS_32BIT_BINDIR, [Search for LTTng Tools 32-bit binaries in this location.])
19 AC_ARG_VAR([LTTNG_TOOLS_64BIT_BINDIR], [Search for LTTng Tools 64-bit binaries in this location.])
20 AC_DEFINE_UNQUOTED([CONFIG_64BIT_BINDIR], $LTTNG_TOOLS_64BIT_BINDIR, [Search for LTTng Tools 64-bit binaries in this location.])
23 AC_CHECK_LIB([pthread], [pthread_create], [],
24 [AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]
28 AC_CHECK_LIB([popt], [poptGetContext], [],
29 [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])]
32 # URCU library version needed or newer
33 liburcu_version=">= 0.6.6"
35 # Check liburcu needed function calls
36 AC_CHECK_DECL([cds_list_add], [],
37 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/list.h>]]
39 AC_CHECK_DECL([cds_wfq_init], [],
40 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
42 AC_CHECK_DECL([cds_wfq_dequeue_blocking], [],
43 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
45 AC_CHECK_DECL([futex_async], [],
46 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/futex.h>]]
48 AC_CHECK_DECL([rcu_thread_offline], [],
49 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
51 AC_CHECK_DECL([rcu_thread_online], [],
52 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
54 AC_CHECK_DECL([caa_likely], [],
55 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
58 # Check liblttng-ust-ctl library
59 AC_ARG_ENABLE(lttng-ust,
60 [ --disable-lttng-ust build without LTTng-UST (Userspace Tracing) support.],
61 lttng_ust_support=no, lttng_ust_support=yes)
64 if test "x$lttng_ust_support" = "xno"; then
65 echo "LTTng-UST support disabled."
68 AC_CHECK_LIB([lttng-ust-ctl], [ustctl_create_session], [],
69 [AC_MSG_ERROR([Cannot find LTTng-UST. Use [LDFLAGS]=-Ldir to specify its location, or specify --disable-lttng-ust to build lttng-tools without LTTng-UST support.])]
72 echo "LTTng-UST support enabled."
76 AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
78 AC_CHECK_FUNCS([sched_getcpu sysconf])
80 # Epoll check. If not present, the build will fallback on poll() API
82 [AX_CONFIG_FEATURE_ENABLE(epoll)],
83 [AX_CONFIG_FEATURE_DISABLE(epoll)]
86 [epoll], [This platform supports epoll(7)],
87 [HAVE_EPOLL], [This platform supports epoll(7).],
88 [enable_epoll="yes"], [enable_epoll="no"]
90 AM_CONDITIONAL([COMPAT_EPOLL], [ test "$enable_epoll" = "yes" ])
95 CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing"
97 DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir)"
99 lttngincludedir="${includedir}/lttng"
101 AC_SUBST(lttngincludedir)
102 AC_SUBST(DEFAULT_INCLUDES)
107 libkernelctl/Makefile
108 liblttng-consumer/Makefile
109 liblttng-kconsumer/Makefile
110 liblttng-ustconsumer/Makefile
112 liblttng-sessiond-comm/Makefile
113 lttng-consumerd/Makefile
114 lttng-sessiond/Makefile