-
Notifications
You must be signed in to change notification settings - Fork 14
/
configure.ac
81 lines (65 loc) · 1.98 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
AC_INIT([workload-kit], 0.1.19)
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_CONFIG_MACRO_DIR([config])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_INIT
AC_CHECK_HEADERS([ \
sys/types.h unistd.h fcntl.h strings.h pthread.h time.h \
errno.h stdarg.h limits.h signal.h stdlib.h
])
AC_CHECK_LIB(pthread, pthread_create)
PKG_PROG_PKG_CONFIG
AC_ARG_ENABLE([ust],
[AS_HELP_STRING([--disable-ust],
[disable ust])],
[ust_support=$enableval], [ust_support=yes])
AS_IF([test "x$ust_support" == "xyes"], [
PKG_CHECK_MODULES([UST], [lttng-ust,liburcu-bp], [],
[AC_MSG_ERROR([Cannot find lttng ust library with pkg-config])])
])
AM_CONDITIONAL([HAVE_UST], [test "x$ust_support" == "xyes"])
AC_ARG_ENABLE([cputemp],
[AS_HELP_STRING([--disable-cputemp],
[disable cputemp])],
[cputemp_support=$enableval], [cputemp_support=yes])
AS_IF([test "x$cputemp_support" == "xyes"], [
AC_CHECK_HEADER(sensors/sensors.h, [],
[AC_MSG_ERROR([can not find sensors/sensors.h])])
AC_CHECK_LIB(sensors, sensors_get_detected_chips,
[SENSORS_LIBS="-lsensors"],
[AC_MSG_ERROR([can not find -lsensors])])
AC_SUBST(SENSORS_LIBS)
])
PKG_CHECK_MODULES([UNWIND], [libunwind], [],
[AC_MSG_ERROR([Cannot find libunwind library with pkg-config])])
AM_CONDITIONAL([HAVE_UST], [test "x$ust_support" == "xyes"])
AM_CONDITIONAL([HAVE_CPUTEMP], [test "x$cputemp_support" == "xyes"])
AC_OPENMP
# be silent by default
AM_SILENT_RULES([yes])
AC_PROG_LIBTOOL
AC_PROG_CC
AM_PROG_CC_C_O
AC_CONFIG_FILES([Makefile
utils/Makefile
src/Makefile
doc/Makefile
ust/Makefile
tests/Makefile
doc/man/Makefile
])
AS_IF([test "x$ust_support" == "xyes"],
[AC_CONFIG_FILES([
ust/bossthread/Makefile
ust/burnust/Makefile
ust/functrace/Makefile
ust/heartbeat/Makefile
ust/hello-openmp/Makefile
ust/threadtree/Makefile
])])
AS_IF([test "x$ust_support" == "xyes" -a "x$cputemp_support" == "xyes"],
[AC_CONFIG_FILES([
ust/cputemp/Makefile
])])
AC_OUTPUT