-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfigure.ac
131 lines (115 loc) · 4.35 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([thapi],[0.0.12],[[email protected]])
AC_CONFIG_SRCDIR([opencl/tracer_opencl_helpers.include.c])
AC_CONFIG_HEADERS([utils/config.h])
# build artifacts in separate dir
AC_CONFIG_AUX_DIR([m4])
AC_CONFIG_MACRO_DIR([m4])
# automake should fail on any error
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.12 subdir-objects])
AM_PROG_AR
# check for libtool
LT_INIT([disable-static])
# Checks for programs.
AC_PROG_LN
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_CXX
AC_PROG_CC
if test -z "$RUBY"; then
AC_CHECK_PROG(RUBY,[ruby],[ruby],[no])
test "$RUBY" == "no" && AC_MSG_ERROR([Required program 'ruby' not found.])
fi
if test -z "$ERB"; then
AC_CHECK_PROG(ERB,[erb],[erb],[no])
test "$ERB" == "no" && AC_MSG_ERROR([Required program 'erb' not found.])
fi
if test -z "$METABABEL"; then
AC_CHECK_PROG(METABABEL,[metababel],[metababel],[no])
test "$METABABEL" == "no" && AC_MSG_ERROR([Required program 'metababel' not found.])
fi
if test -z "$LTTNG_GEN_TP"; then
AC_CHECK_PROG(LTTNG_GEN_TP,[lttng-gen-tp],[lttng-gen-tp],[no])
test "$LTTNG_GEN_TP" == "no" && AC_MSG_ERROR([Required program 'lttng-gen-tp' not found.])
fi
if test -z "$BABELTRACE2_PROG"; then
AC_CHECK_PROG(BABELTRACE2_PROG,[babeltrace2],[babeltrace2],[no])
test "$BABELTRACE2_PROG" == "no" && AC_MSG_ERROR([Required program 'babeltrace2' not found.])
fi
if test -z "$PATCH"; then
AC_CHECK_PROG(PATCH,[patch],[patch],[no])
test "$PATCH" == "no" && AC_MSG_ERROR([Required program 'patch' not found.])
fi
if test -z "$PROTOC"; then
AC_CHECK_PROG(PROTOC,[protoc],[protoc],[no])
test "$PROTOC" == "no" && AC_MSG_ERROR([Required program 'protoc' not found.])
fi
# Checks for libraries.
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([iberty], [cplus_demangle])
AC_CHECK_HEADERS([demangle.h], [using_demangle=yes], [using_demangle=no])
AS_IF([test "x$using_demangle" != xyes],
[AC_CHECK_HEADERS([libiberty/demangle.h], [], [AC_MSG_WARN([Couldn't find demangle.h, demangling will be deactivated...])])])
AC_ARG_ENABLE([strict], AS_HELP_STRING([--enable-strict], [Enable -Werror]), [], [enable_strict=yes])
AM_CONDITIONAL([STRICT], [test "x$enable_strict" = xyes])
# By default `--enable-mpi`, will set the "enable_mpi" variable
AC_ARG_ENABLE([mpi], AS_HELP_STRING([--disable-mpi], [Disable mpi sync daemon]))
AS_IF([test "x$enable_mpi" != xno], [
AX_MPI([enable_mpi=yes], [enable_mpi=no])
])
AM_CONDITIONAL([FOUND_MPI], [test "x$enable_mpi" != "xno"])
PKG_CHECK_MODULES([LIBFFI], [libffi >= 3.2])
PKG_CHECK_MODULES([BABELTRACE2], [babeltrace2 >= 2.0])
PKG_CHECK_MODULES([LTTNG_UST], [lttng-ust >= 2.10])
PKG_CHECK_MODULES([PROTOBUF], [protobuf >= 3.0])
AX_RUBY_EXTENSION([cast-to-yaml], [yes])
AX_RUBY_EXTENSION([nokogiri], [yes])
AX_RUBY_EXTENSION([babeltrace2], [yes])
AX_RUBY_EXTENSION([metababel >= 1.1.2], [yes])
# Checks for header files.
AC_CHECK_HEADERS([inttypes.h stddef.h stdint.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([clock_gettime ftruncate memmove memset strdup strstr strtoull strlen strchr])
AC_CONFIG_FILES([
Makefile
sampling/Makefile
opencl/Makefile
ze/Makefile
cuda/Makefile
omp/Makefile
hip/Makefile
mpi/Makefile
xprof/Makefile
utils/Makefile
])
AC_CONFIG_FILES([utils/test_wrapper_thapi_text_pretty.sh], [chmod +x utils/test_wrapper_thapi_text_pretty.sh])
AC_CONFIG_FILES([opencl/tracer_opencl.sh], [chmod +x opencl/tracer_opencl.sh])
AC_CONFIG_FILES([opencl/extract_enqueues], [chmod +x opencl/extract_enqueues])
AC_CONFIG_FILES([ze/tracer_ze.sh], [chmod +x ze/tracer_ze.sh])
AC_CONFIG_FILES([cuda/tracer_cuda.sh], [chmod +x cuda/tracer_cuda.sh])
AC_CONFIG_FILES([omp/tracer_omp.sh], [chmod +x omp/tracer_omp.sh])
AC_CONFIG_FILES([hip/tracer_hip.sh], [chmod +x hip/tracer_hip.sh])
AC_CONFIG_FILES([mpi/tracer_mpi.sh], [chmod +x mpi/tracer_mpi.sh])
AC_CONFIG_FILES([utils/babeltrace_thapi], [chmod +x utils/babeltrace_thapi])
AC_CONFIG_FILES([xprof/xprof.rb], [chmod +x xprof/xprof.rb])
AC_OUTPUT