fix: missing man page in tar
[lttngtop.git] / configure.ac
CommitLineData
1fc22eb4
JD
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
54645d5c 4AC_INIT([lttngtop],[0.3],[jdesfossez@efficios.com])
1fc22eb4
JD
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
17AC_PROG_MAKE_SET
18LT_INIT
19AC_PROG_YACC
20AC_PROG_LEX
21
22# Checks for typedefs, structures, and compiler characteristics.
23AC_C_INLINE
24AC_TYPE_PID_T
25AC_TYPE_SIZE_T
26
27# Checks for library functions.
28AC_FUNC_MALLOC
29AC_FUNC_MMAP
30AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
31
32# Check for libuuid
33AC_CHECK_LIB([uuid], [uuid_generate], [],
34 [AC_MSG_ERROR([Cannot find the libuuid library.])]
35)
36
37# Check for libpopt
38AC_CHECK_LIB([popt], [poptGetContext], [],
39 [AC_MSG_ERROR([Cannot find the popt library.])]
40)
41
42# Check for libncurses
ec016cb4 43AC_CHECK_LIB([ncurses], [initscr], [], [HAVE_NCURSES=0]
1fc22eb4
JD
44)
45
46# Check for libpanel, also part of libncurses
47# (but this check will add the required -lpanel flag)
ec016cb4 48AC_CHECK_LIB([panel], [update_panels], [], [HAVE_PANELS=0]
1fc22eb4
JD
49)
50
74ab85b4
JD
51# Check for libbabeltrace
52AC_CHECK_LIB([babeltrace], [bt_context_create], [],
53 [AC_MSG_ERROR([Cannot find the babeltrace library.])]
54 )
55
56# Check for libbabeltrace-ctf
57AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
58 [AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
59 )
60
1fc22eb4
JD
61# Check for Glib. It needs to be installed anyway or this macro will not be defined.
62AM_PATH_GLIB_2_0([2.22.0], [],
63 [AC_MSG_ERROR([Glib 2.22 is required in order to compile LTTngTop.
64Please install the Glib development files.])], [gmodule]
65)
66
67pkg_modules="gmodule-2.0 >= 2.0.0"
68PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
69AC_SUBST(PACKAGE_LIBS)
70LIBS="$LIBS $GMODULE_LIBS"
71
72PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
73AC_SUBST(PACKAGE_CFLAGS)
74
75AC_CONFIG_FILES([
76 Makefile
37010c3c 77 src/Makefile
661ad2e0 78 doc/Makefile
09e7f98e 79 utils/Makefile
1fc22eb4
JD
80])
81AC_OUTPUT
ec016cb4
JD
82
83AS_IF([test "x$HAVE_NCURSES" = "x0"],[
84 AS_ECHO()
85 AS_ECHO_N("Ncurses GUI won't be compiled install ncurses if you want it.")
86 ], [
87 CURSES_LIBS="-lcurses -lpanel"
88 AC_SUBST(CURSES_LIBS)
89 AS_ECHO()
90 AS_ECHO_N("Ncurses GUI will be compiled.")
91 ])
92AS_ECHO()
93
This page took 0.027403 seconds and 4 git commands to generate.