Fix consumer pid mutex double-unlock
[lttng-tools.git] / configure.ac
CommitLineData
ab7f4103 1AC_INIT([lttng-tools], [2.0-pre14], [david.goulet@polymtl.ca], ,[http://lttng.org])
fac6795d 2AC_CONFIG_AUX_DIR([config])
6e2d116c
DG
3AC_CANONICAL_TARGET
4AC_CANONICAL_HOST
fac6795d 5AC_CONFIG_MACRO_DIR([config])
0403d7c9 6AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
c615ee2f 7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
fac6795d 8
3bd1e081
MD
9AC_CONFIG_HEADERS([include/config.h])
10
fac6795d
DG
11AC_CHECK_HEADERS([ \
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 \
15])
16
fb09408a
MD
17AC_ARG_VAR([LTTNG_TOOLS_COMPAT_BIN_DIR], [Search for LTTng Tools 32-bit compatibility binaries in this location.])
18AC_DEFINE_UNQUOTED([CONFIG_COMPAT_BIN_DIR], $LTTNG_TOOLS_COMPAT_BIN_PREFIX, [Search for LTTng Tools 32-bit compatibility binaries in this location.])
43cadc7e 19
fac6795d
DG
20# Check for pthread
21AC_CHECK_LIB([pthread], [pthread_create], [],
22 [AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]
23)
24
25# Check libpopt
26AC_CHECK_LIB([popt], [poptGetContext], [],
27 [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])]
28)
29
6e59ae26
DG
30# URCU library version needed or newer
31liburcu_version=">= 0.6.6"
32
3ffccaed 33# Check liburcu needed function calls
fac6795d 34AC_CHECK_DECL([cds_list_add], [],
8e12081b 35 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/list.h>]]
fac6795d 36)
099e26bd 37AC_CHECK_DECL([cds_wfq_init], [],
8e12081b
DG
38 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
39)
487cf67c
DG
40AC_CHECK_DECL([cds_wfq_dequeue_blocking], [],
41 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
42)
8e12081b
DG
43AC_CHECK_DECL([futex_async], [],
44 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/futex.h>]]
099e26bd 45)
3ffccaed
DG
46AC_CHECK_DECL([rcu_thread_offline], [],
47 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
48)
49AC_CHECK_DECL([rcu_thread_online], [],
50 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
51)
6e59ae26
DG
52AC_CHECK_DECL([caa_likely], [],
53 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
54)
55
74d0b642
MD
56# Check liblttng-ust-ctl library
57AC_ARG_ENABLE(lttng-ust,
58 [ --disable-lttng-ust build without LTTng-UST (Userspace Tracing) support.],
59 lttng_ust_support=no, lttng_ust_support=yes)
60
61[
62if test "x$lttng_ust_support" = "xno"; then
63 echo "LTTng-UST support disabled."
64else
65]
66 AC_CHECK_LIB([lttng-ust-ctl], [ustctl_create_session], [],
67 [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.])]
68 )
69[
70 echo "LTTng-UST support enabled."
71fi
72]
73
74AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
099e26bd 75
f6a9efaa
DG
76AC_CHECK_FUNCS([sched_getcpu sysconf])
77
3ffccaed 78# Epoll check. If not present, the build will fallback on poll() API
71615260
DG
79AX_HAVE_EPOLL(
80 [AX_CONFIG_FEATURE_ENABLE(epoll)],
81 [AX_CONFIG_FEATURE_DISABLE(epoll)]
82)
71615260
DG
83AX_CONFIG_FEATURE(
84 [epoll], [This platform supports epoll(7)],
85 [HAVE_EPOLL], [This platform supports epoll(7).],
86 [enable_epoll="yes"], [enable_epoll="no"]
87)
71615260
DG
88AM_CONDITIONAL([COMPAT_EPOLL], [ test "$enable_epoll" = "yes" ])
89
fac6795d
DG
90AC_PROG_CC
91AC_PROG_LIBTOOL
92
6e2d116c
DG
93CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing"
94
95DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir)"
96
97lttngincludedir="${includedir}/lttng"
98
99AC_SUBST(lttngincludedir)
100AC_SUBST(DEFAULT_INCLUDES)
101
fac6795d
DG
102AC_CONFIG_FILES([
103 Makefile
104 include/Makefile
ee0326c0 105 libkernelctl/Makefile
3bd1e081
MD
106 liblttng-consumer/Makefile
107 liblttng-kconsumer/Makefile
108 liblttng-ustconsumer/Makefile
fac6795d 109 liblttngctl/Makefile
ca3c5ac0 110 liblttng-sessiond-comm/Makefile
3bd1e081 111 lttng-consumerd/Makefile
32258573 112 lttng-sessiond/Makefile
fac6795d
DG
113 lttng/Makefile
114 tests/Makefile
ebb6ebd5 115 doc/Makefile
fac6795d
DG
116])
117
118AC_OUTPUT
This page took 0.029208 seconds and 4 git commands to generate.