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