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