-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
93 lines (75 loc) · 2.26 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([lttngtop],[0.3],[[email protected]])
AC_CONFIG_AUX_DIR([config])
AC_CANONICAL_TARGET
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
LT_INIT
AC_PROG_YACC
AC_PROG_LEX
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
# Check for libuuid
AC_CHECK_LIB([uuid], [uuid_generate], [],
[AC_MSG_ERROR([Cannot find the libuuid library.])]
)
# Check for libpopt
AC_CHECK_LIB([popt], [poptGetContext], [],
[AC_MSG_ERROR([Cannot find the popt library.])]
)
# Check for libncurses
AC_CHECK_LIB([ncurses], [initscr], [], [HAVE_NCURSES=0]
)
# Check for libpanel, also part of libncurses
# (but this check will add the required -lpanel flag)
AC_CHECK_LIB([panel], [update_panels], [], [HAVE_PANELS=0]
)
# Check for libbabeltrace
AC_CHECK_LIB([babeltrace], [bt_context_create], [],
[AC_MSG_ERROR([Cannot find the babeltrace library.])]
)
# Check for libbabeltrace-ctf
AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
[AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
)
# Check for Glib. It needs to be installed anyway or this macro will not be defined.
AM_PATH_GLIB_2_0([2.22.0], [],
[AC_MSG_ERROR([Glib 2.22 is required in order to compile LTTngTop.
Please install the Glib development files.])], [gmodule]
)
pkg_modules="gmodule-2.0 >= 2.0.0"
PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
AC_SUBST(PACKAGE_LIBS)
LIBS="$LIBS $GMODULE_LIBS"
PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
AC_SUBST(PACKAGE_CFLAGS)
AC_CONFIG_FILES([
Makefile
src/Makefile
doc/Makefile
utils/Makefile
])
AC_OUTPUT
AS_IF([test "x$HAVE_NCURSES" = "x0"],[
AS_ECHO()
AS_ECHO_N("Ncurses GUI won't be compiled install ncurses if you want it.")
], [
CURSES_LIBS="-lcurses -lpanel"
AC_SUBST(CURSES_LIBS)
AS_ECHO()
AS_ECHO_N("Ncurses GUI will be compiled.")
])
AS_ECHO()