Convert LTTngTop to C++ and state system
[lttngtop.git] / configure.ac
CommitLineData
1fc22eb4
JD
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_INIT([lttngtop],[0.2],[julien dot desfossez at efficios dot com])
5AC_CONFIG_AUX_DIR([config])
6AC_CANONICAL_TARGET
7AC_CANONICAL_HOST
8AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
9AM_SILENT_RULES([yes])
10
11AC_CONFIG_MACRO_DIR([m4])
12
13AC_CONFIG_HEADERS([config.h])
14
15# Checks for programs.
16AC_PROG_CC
715cf83c 17AC_PROG_CXX
1fc22eb4
JD
18AC_PROG_MAKE_SET
19LT_INIT
20AC_PROG_YACC
21AC_PROG_LEX
22
23# Checks for typedefs, structures, and compiler characteristics.
24AC_C_INLINE
25AC_TYPE_PID_T
26AC_TYPE_SIZE_T
27
28# Checks for library functions.
29AC_FUNC_MALLOC
30AC_FUNC_MMAP
31AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
32
33# Check for libuuid
34AC_CHECK_LIB([uuid], [uuid_generate], [],
35 [AC_MSG_ERROR([Cannot find the libuuid library.])]
36)
37
38# Check for libpopt
39AC_CHECK_LIB([popt], [poptGetContext], [],
40 [AC_MSG_ERROR([Cannot find the popt library.])]
41)
42
43# Check for libncurses
44AC_CHECK_LIB([ncurses], [initscr], [],
45 [AC_MSG_ERROR([Cannot find the the ncurses library.])]
46)
47
48# Check for libpanel, also part of libncurses
49# (but this check will add the required -lpanel flag)
50AC_CHECK_LIB([panel], [update_panels], [],
51 [AC_MSG_ERROR([Cannot find the the ncurses library.])]
52)
53
74ab85b4
JD
54# Check for libbabeltrace
55AC_CHECK_LIB([babeltrace], [bt_context_create], [],
56 [AC_MSG_ERROR([Cannot find the babeltrace library.])]
57 )
58
59# Check for libbabeltrace-ctf
60AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
61 [AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
62 )
63
1fc22eb4
JD
64# Check for Glib. It needs to be installed anyway or this macro will not be defined.
65AM_PATH_GLIB_2_0([2.22.0], [],
66 [AC_MSG_ERROR([Glib 2.22 is required in order to compile LTTngTop.
67Please install the Glib development files.])], [gmodule]
68)
69
70pkg_modules="gmodule-2.0 >= 2.0.0"
71PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
72AC_SUBST(PACKAGE_LIBS)
73LIBS="$LIBS $GMODULE_LIBS"
74
75PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
76AC_SUBST(PACKAGE_CFLAGS)
77
78AC_CONFIG_FILES([
79 Makefile
37010c3c 80 src/Makefile
661ad2e0 81 doc/Makefile
1fc22eb4
JD
82])
83AC_OUTPUT
This page took 0.03437 seconds and 4 git commands to generate.