2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([lttngtop],[0.2],[julien dot desfossez at efficios dot com])
5 AC_CONFIG_AUX_DIR([config])
8 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
11 AC_CONFIG_MACRO_DIR([m4])
13 AC_CONFIG_HEADERS([config.h])
15 # Checks for programs.
23 # Checks for typedefs, structures, and compiler characteristics.
28 # Checks for library functions.
31 AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
34 AC_CHECK_LIB([uuid], [uuid_generate], [],
35 [AC_MSG_ERROR([Cannot find the libuuid library.])]
39 AC_CHECK_LIB([popt], [poptGetContext], [],
40 [AC_MSG_ERROR([Cannot find the popt library.])]
43 # Check for libncurses
44 AC_CHECK_LIB([ncurses], [initscr], [],
45 [AC_MSG_ERROR([Cannot find the the ncurses library.])]
48 # Check for libpanel, also part of libncurses
49 # (but this check will add the required -lpanel flag)
50 AC_CHECK_LIB([panel], [update_panels], [],
51 [AC_MSG_ERROR([Cannot find the the ncurses library.])]
54 # Check for libbabeltrace
55 AC_CHECK_LIB([babeltrace], [bt_context_create], [],
56 [AC_MSG_ERROR([Cannot find the babeltrace library.])]
59 # Check for libbabeltrace-ctf
60 AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
61 [AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
64 # Check for Glib. It needs to be installed anyway or this macro will not be defined.
65 AM_PATH_GLIB_2_0([2.22.0], [],
66 [AC_MSG_ERROR([Glib 2.22 is required in order to compile LTTngTop.
67 Please install the Glib development files.])], [gmodule]
70 pkg_modules="gmodule-2.0 >= 2.0.0"
71 PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
72 AC_SUBST(PACKAGE_LIBS)
73 LIBS="$LIBS $GMODULE_LIBS"
75 PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
76 AC_SUBST(PACKAGE_CFLAGS)