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