Fix session daemon binary name
[lttng-tools.git] / configure.ac
CommitLineData
d46482f0 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
ebaeda94 17AC_ARG_WITH([consumerd32-path],
a4b279ba 18 AS_HELP_STRING([--with-consumerd32-path],
ebaeda94
MD
19 [Location of the 32-bit consumerd executable]),
20 [CONSUMERD32_PATH="$withval"],
21 [CONSUMERD32_PATH=''])
22AC_SUBST([CONSUMERD32_PATH])
23
24AC_ARG_WITH([consumerd64-path],
a4b279ba 25 AS_HELP_STRING([--with-consumerd64-path],
ebaeda94
MD
26 [Location of the 64-bit consumerd executable]),
27 [CONSUMERD64_PATH="$withval"],
28 [CONSUMERD64_PATH=''])
29AC_SUBST([CONSUMERD64_PATH])
30
31AC_ARG_WITH([consumerd32-libdir],
a4b279ba 32 AS_HELP_STRING([--with-consumerd32-libdir],
ebaeda94
MD
33 [Location of the 32-bit consumerd libraries]),
34 [CONSUMERD32_LIBDIR="$withval"],
35 [CONSUMERD32_LIBDIR=''])
36AC_SUBST([CONSUMERD32_LIBDIR])
37
38AC_ARG_WITH([consumer64d-libdir],
a4b279ba 39 AS_HELP_STRING([--with-consumerd64-libdir],
ebaeda94
MD
40 [Location of the 64-bit consumerd libraries]),
41 [CONSUMERD64_LIBDIR="$withval"],
42 [CONSUMERD64_LIBDIR=''])
43AC_SUBST([CONSUMERD64_LIBDIR])
44
45AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_PATH], $CONSUMERD32_PATH, [Location of the 32-bit consumerd executable.])
46AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_PATH], $CONSUMERD64_PATH, [Location of the 64-bit consumerd executable])
47AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD32_LIBDIR], $CONSUMERD32_LIBDIR, [Search for consumerd 32-bit libraries in this location.])
48AC_DEFINE_UNQUOTED([CONFIG_CONSUMERD64_LIBDIR], $CONSUMERD64_LIBDIR, [Search for consumerd 64-bit libraries in this location.])
8e12081b 49
fac6795d
DG
50# Check for pthread
51AC_CHECK_LIB([pthread], [pthread_create], [],
52 [AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]
53)
54
55# Check libpopt
56AC_CHECK_LIB([popt], [poptGetContext], [],
57 [AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])]
58)
59
4f58e627 60# Needed for benchmark time
3c6bae61 61AC_CHECK_DECL([caa_get_cycles], [],
aebe93ee
DG
62 [AC_MSG_ERROR([liburcu liburcu_version or newer is needed])], [[#include <urcu/arch.h>]]
63)
64
6e59ae26
DG
65# URCU library version needed or newer
66liburcu_version=">= 0.6.6"
67
3ffccaed 68# Check liburcu needed function calls
fac6795d 69AC_CHECK_DECL([cds_list_add], [],
8e12081b 70 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/list.h>]]
fac6795d 71)
099e26bd 72AC_CHECK_DECL([cds_wfq_init], [],
8e12081b
DG
73 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
74)
487cf67c
DG
75AC_CHECK_DECL([cds_wfq_dequeue_blocking], [],
76 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
77)
8e12081b
DG
78AC_CHECK_DECL([futex_async], [],
79 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/futex.h>]]
3c6bae61 80)
3ffccaed
DG
81AC_CHECK_DECL([rcu_thread_offline], [],
82 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
83)
84AC_CHECK_DECL([rcu_thread_online], [],
85 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
86)
6e59ae26
DG
87AC_CHECK_DECL([caa_likely], [],
88 [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu.h>]]
3bd1e081
MD
89)
90
74d0b642
MD
91# Check liblttng-ust-ctl library
92AC_ARG_ENABLE(lttng-ust,
6299f964 93 AS_HELP_STRING([--disable-lttng-ust],[build without LTTng-UST (Userspace Tracing) support]),
0e636c80 94 lttng_ust_support=$enableval, lttng_ust_support=yes)
74d0b642 95
6299f964 96AS_IF([test "x$lttng_ust_support" = "xyes"], [
74d0b642
MD
97 AC_CHECK_LIB([lttng-ust-ctl], [ustctl_create_session], [],
98 [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.])]
99 )
6299f964 100])
74d0b642
MD
101
102AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
099e26bd 103
f6a9efaa 104AC_CHECK_FUNCS([sched_getcpu sysconf])
3c6bae61 105
55bed213
AM
106# Option to only build the consumer daemon and its libraries
107AC_ARG_WITH([consumerd-only],
108 AS_HELP_STRING([--with-consumerd-only],[Only build the consumer daemon [default=no]]),
109 [consumerd_only=$withval],
110 [consumerd_only=no])
111AM_CONDITIONAL([BUILD_CONSUMERD_ONLY], [test "x$consumerd_only" = "xyes"])
112
3ffccaed 113# Epoll check. If not present, the build will fallback on poll() API
71615260
DG
114AX_HAVE_EPOLL(
115 [AX_CONFIG_FEATURE_ENABLE(epoll)],
116 [AX_CONFIG_FEATURE_DISABLE(epoll)]
117)
71615260
DG
118AX_CONFIG_FEATURE(
119 [epoll], [This platform supports epoll(7)],
120 [HAVE_EPOLL], [This platform supports epoll(7).],
121 [enable_epoll="yes"], [enable_epoll="no"]
122)
71615260
DG
123AM_CONDITIONAL([COMPAT_EPOLL], [ test "$enable_epoll" = "yes" ])
124
fac6795d 125AC_PROG_CC
3889a2d6 126LT_INIT
fac6795d 127
6e2d116c
DG
128CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing"
129
130DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir)"
131
132lttngincludedir="${includedir}/lttng"
133
134AC_SUBST(lttngincludedir)
135AC_SUBST(DEFAULT_INCLUDES)
136
fac6795d
DG
137AC_CONFIG_FILES([
138 Makefile
139 include/Makefile
b25a8868 140 benchmark/Makefile
ee0326c0 141 libkernelctl/Makefile
3bd1e081
MD
142 liblttng-consumer/Makefile
143 liblttng-kconsumer/Makefile
144 liblttng-ustconsumer/Makefile
fac6795d 145 liblttngctl/Makefile
ca3c5ac0 146 liblttng-sessiond-comm/Makefile
3bd1e081 147 lttng-consumerd/Makefile
32258573 148 lttng-sessiond/Makefile
fac6795d
DG
149 lttng/Makefile
150 tests/Makefile
ebb6ebd5 151 doc/Makefile
fac6795d
DG
152])
153
154AC_OUTPUT
6299f964
AM
155
156# Mini-report on what will be built
157AS_ECHO("")
158
159AS_ECHO_N("Lttng-UST support: ")
160AS_IF([test "x$lttng_ust_support" = "xyes"], [AS_ECHO("Enabled")],
55bed213
AM
161 [AS_ECHO("Disabled")]
162)
163
164AS_IF([test "x$consumerd_only" = "xyes"],
165 [AS_ECHO("Only the consumerd daemon will be built.")],
166 [AS_ECHO("All binaries will be built.")]
167)
6299f964
AM
168
169AS_ECHO("")
170
This page took 0.0376 seconds and 4 git commands to generate.