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