Fix: add missing files to make dist, disable python bindings
[babeltrace.git] / configure.ac
CommitLineData
9d594903 1AC_PREREQ([2.50])
a2edfc7d
PP
2m4_define([bt_version_major], [2])
3m4_define([bt_version_minor], [0])
4m4_define([bt_version_patch], [0])
5m4_define([bt_version_extra], [-pre])
6m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_extra)
7AC_INIT([babeltrace],bt_version,[jeremie dot galarneau at efficios dot com])
3fbccce7
MD
8
9# Following the numbering scheme proposed by libtool for the library version
10# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
a2edfc7d 11AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_version_major[:]bt_version_minor[:]bt_version_patch)
3fbccce7 12
80e2fb15 13AC_CONFIG_HEADERS([config.h])
ac65e355 14AC_CONFIG_AUX_DIR([config])
80e2fb15
MJ
15AC_CONFIG_MACRO_DIR([m4])
16
a2edfc7d
PP
17AC_DEFINE([BT_VERSION_MAJOR], bt_version_major, [Babeltrace library major version])
18AC_DEFINE([BT_VERSION_MINOR], bt_version_minor, [Babeltrace library minor version])
19AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace library patch version])
20AC_DEFINE([BT_VERSION_EXTRA], ["]bt_version_extra["], [Babeltrace library extra version])
21
ac65e355
MD
22AC_CANONICAL_TARGET
23AC_CANONICAL_HOST
80e2fb15 24
01298f5e 25AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-ustar])
99e3ba41 26AM_MAINTAINER_MODE([enable])
ac65e355 27
80e2fb15
MJ
28# Enable silent rules if available (Introduced in AM 1.11)
29m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
0671bd13 30
3d5e9596
MJ
31AC_REQUIRE_AUX_FILE([tap-driver.sh])
32
80e2fb15
MJ
33# Checks for C compiler
34AC_USE_SYSTEM_EXTENSIONS
217108a9 35AC_SYS_LARGEFILE
80e2fb15
MJ
36AC_PROG_CC
37AC_PROG_CC_STDC
217108a9 38
ac65e355 39# Checks for programs.
ac65e355 40AC_PROG_MAKE_SET
aa225880 41LT_INIT
8b9d5b5e
MD
42AC_PROG_YACC
43AC_PROG_LEX
80e2fb15
MJ
44AC_PROG_MKDIR_P
45AC_PROG_LN_S
ac65e355 46
ec8add54
MJ
47AX_C___ATTRIBUTE__
48AS_IF([test "x$ax_cv___attribute__" = "xyes"],
49 [:],
50 [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
51
a2bc83d4
MJ
52AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
53LIBS="$PTHREAD_LIBS $LIBS"
54CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
55CC="$PTHREAD_CC"
56
f0d8d709
AM
57# Check linker option
58AX_APPEND_LINK_FLAGS([-Wl,--no-as-needed], [LD_NO_AS_NEEDED])
59AC_SUBST([LD_NO_AS_NEEDED])
60
f847f3ae
MJ
61AC_HEADER_STDBOOL
62AC_CHECK_HEADERS([ \
63 fcntl.h \
64 float.h \
65 libintl.h \
66 limits.h \
67 malloc.h \
68 netdb.h \
69 netinet/in.h \
70 stddef.h \
71 sys/socket.h \
72])
80e2fb15 73
dc3fffef 74if test ! -f "$srcdir/plugins/ctf/common/metadata/parser.h"; then
e3e6755d 75 if test x"$(basename "$YACC")" != "xbison -y"; then
331d78f5
YB
76 AC_MSG_ERROR([[bison not found and is required when building from git.
77 Please install bison]])
78 fi
2b4887a2
JR
79 AC_PATH_PROG([BISON],[bison])
80 AX_PROG_BISON_VERSION([2.4], [],[
81 AC_MSG_ERROR([[Bison >= 2.4 is required when building from git]])
82 ])
331d78f5
YB
83fi
84
dc3fffef 85if test ! -f "$srcdir/plugins/ctf/common/metadata/lexer.c"; then
331d78f5
YB
86 if test x"$LEX" != "xflex"; then
87 AC_MSG_ERROR([[flex not found and is required when building from git.
88 Please install flex]])
89 fi
33bdeb6a
JR
90 AC_PATH_PROG([FLEX],[flex])
91 AX_PROG_FLEX_VERSION([2.5.35], [],[
92 AC_MSG_ERROR([[Flex >= 2.5.35 is required when building from git]])
93 ])
331d78f5
YB
94fi
95
e5f5317f 96
a6947cca 97AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
ac65e355 98
39fa4402
MJ
99# Check what libraries are required on this platform to link sockets programs.
100AX_LIB_SOCKET_NSL
101
ac65e355
MD
102# Checks for typedefs, structures, and compiler characteristics.
103AC_C_INLINE
104AC_TYPE_PID_T
105AC_TYPE_SIZE_T
31510f02
JR
106AC_TYPE_INT16_T
107AC_TYPE_INT32_T
108AC_TYPE_INT64_T
109AC_TYPE_INT8_T
110AC_TYPE_OFF_T
111AC_TYPE_SSIZE_T
112AC_TYPE_UINT16_T
113AC_TYPE_UINT32_T
114AC_TYPE_UINT64_T
115AC_TYPE_UINT8_T
ac65e355
MD
116
117# Checks for library functions.
f847f3ae
MJ
118AC_FUNC_ALLOCA
119AC_FUNC_FORK
ac65e355 120AC_FUNC_MALLOC
f847f3ae 121AC_FUNC_MKTIME
ac65e355 122AC_FUNC_MMAP
f847f3ae
MJ
123AC_FUNC_REALLOC
124AC_FUNC_STRERROR_R
2f8c0e47 125AC_CHECK_FUNCS([ \
f847f3ae
MJ
126 atexit \
127 dirfd \
128 dup2 \
129 ftruncate \
130 gethostbyname \
131 gethostname \
132 gettimeofday \
133 localtime_r \
134 memchr \
135 memset \
136 mkdir \
137 mkdtemp \
138 munmap \
139 rmdir \
140 setenv \
141 socket \
142 strchr \
143 strdup \
144 strerror \
145 strndup \
146 strnlen \
147 strrchr \
148 strtoul \
149 strtoull \
150 tzset \
151 uname \
2f8c0e47 152])
ac65e355 153
58819898 154MINGW32=no
2748fb3b 155DEFAULT_ENABLE_DEBUG_INFO=yes
a3d28380
MJ
156AS_CASE([$host_os],
157 [solaris*|darwin*],
158 [
2748fb3b 159 DEFAULT_ENABLE_DEBUG_INFO=no
a3d28380
MJ
160 ],
161 [mingw*],
162 [
163 MINGW32=yes
251b4638 164 DEFAULT_ENABLE_DEBUG_INFO=no
a3d28380
MJ
165 ]
166)
58819898
JI
167
168AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"])
169
4120f662
MJ
170# Check for uuid in system libs
171AC_CHECK_FUNCS([uuid_generate],
a4dfa07b 172[
4120f662
MJ
173 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.])
174 link_with_libuuid=no
a4dfa07b
MD
175],
176[
2741f55b
SM
177 # First, check the pkg-config module is available, otherwise explicitly check
178 # for libuuid, or uuid support in the C-library.
179 PKG_CHECK_MODULES([UUID], [uuid],
4120f662 180 [
2741f55b
SM
181 LIBS="${UUID_LIBS} ${LIBS}"
182 CFLAGS="${CFLAGS} ${UUID_CFLAGS}"
4120f662
MJ
183 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.])
184 link_with_libuuid=yes
185 ],
186 [
2741f55b
SM
187 # Check for libuuid
188 AC_CHECK_LIB([uuid], [uuid_generate],
4120f662 189 [
2741f55b
SM
190 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.])
191 link_with_libuuid=yes
4120f662
MJ
192 ],
193 [
2741f55b
SM
194 # libuuid not found, check for uuid_create in libc.
195 AC_CHECK_LIB([c], [uuid_create],
196 [
197 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBC_UUID], 1, [Has libc uuid support.])
198 link_with_libc_uuid=yes
199 ],
200 [
5fc11b53 201 # for MinGW32 we have our own internal implementation of uuid using Windows functions.
2741f55b
SM
202 if test "x$MINGW32" = xno; then
203 AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.])
204 fi
205 ])
4120f662
MJ
206 ])
207 ])
208])
209
210AM_CONDITIONAL([BABELTRACE_BUILD_WITH_LIBUUID], [test "x$link_with_libuuid" = "xyes"])
211AM_CONDITIONAL([BABELTRACE_BUILD_WITH_LIBC_UUID], [test "x$link_with_libc_uuid" = "xyes"])
fd55fc57 212
f8370579
MD
213# Check for fmemopen
214AC_CHECK_LIB([c], [fmemopen],
215[
216 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FMEMOPEN], 1, [Has fmemopen support.])
217]
218)
219
220# Check for open_memstream
221AC_CHECK_LIB([c], [open_memstream],
222[
223 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_OPEN_MEMSTREAM], 1, [Has open_memstream support.])
224]
225)
226
a323afb2
JG
227# Check for posix_fallocate
228AC_CHECK_LIB([c], [posix_fallocate],
229[
230 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_POSIX_FALLOCATE], 1, [Has posix_fallocate support.])
231]
232)
233
0bb657dc
MD
234# Check for faccessat
235AC_CHECK_LIB([c], [faccessat],
236[
237 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FACCESSAT], 1, [Has faccessat support.])
238]
239)
240
0f536a74
TP
241AC_CHECK_LIB([popt], [poptGetContext], [],
242 [AC_MSG_ERROR([Cannot find popt.])]
243)
244
a094f13b
PP
245# Plugins
246AC_ARG_VAR([PLUGINSDIR], [built-in plugins install directory [LIBDIR/babeltrace/plugins]])
247AS_IF([test "x$PLUGINSDIR" = x], [PLUGINSDIR='$(libdir)/babeltrace/plugins'])
248
24a3136a
DS
249# For Python
250# SWIG version needed or newer:
251swig_version=2.0.0
252
94a6cea3
JG
253AC_ARG_ENABLE([python-bindings],
254 [AC_HELP_STRING([--enable-python-bindings],
255 [generate Python bindings])],
fb4be38a 256 [enable_python_bindings=$enableval], [enable_python_bindings=no])
24a3136a 257
55bb57e0 258AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python_bindings:-yes}" = xyes])
24a3136a 259
55bb57e0
PP
260AC_ARG_ENABLE(
261 [python-plugins],
262 [AC_HELP_STRING(
263 [--enable-python-plugins],
264 [add support for the Babeltrace library and converter to load Python plugins])
265 ],
fb4be38a 266 [enable_python_plugins=$enableval],
55bb57e0
PP
267 [enable_python_plugins=no]
268)
9cf643d1 269
55bb57e0
PP
270if test "x${enable_python_bindings:-yes}" = xyes; then
271 AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ])
272else
273 AC_MSG_NOTICE([You may configure with --enable-python-bindings ]dnl
274[if you want Python bindings.])
4f5f37d9
PP
275fi
276
55bb57e0 277if test "x$enable_python_bindings" != xno || test "x$enable_python_plugins" != xno; then
c3ddb532 278 AM_PATH_PYTHON([3.0], , [AC_MSG_ERROR(Python 3 is not available or is not the default Python interpreter on your system. See the README file to learn how to override your distribution's default Python interpreter.)])
24a3136a 279
1b39e2de
JG
280 AM_PATH_PYTHON_MODULES([PYTHON])
281 # pythondir is the path where extra modules are to be installed
282 pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH
283 # pyexecdir is the path that contains shared objects used by the extra modules
284 pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH
55bb57e0
PP
285 AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for Python, bypassing python-config])
286 AC_ARG_VAR([PYTHON_LIBS], [Library flags for Python, bypassing python-config])
24a3136a
DS
287 AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
288 AS_IF([test -z "$PYTHON_INCLUDE"], [
289 AS_IF([test -z "$PYTHON_CONFIG"], [
290 AC_PATH_PROGS([PYTHON_CONFIG],
291 [python$PYTHON_VERSION-config python-config],
292 [no],
293 [`dirname $PYTHON`])
94a6cea3 294 AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])])
24a3136a 295 ])
55bb57e0 296 AC_MSG_CHECKING([Python include flags])
24a3136a
DS
297 PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
298 AC_MSG_RESULT([$PYTHON_INCLUDE])
299 ])
55bb57e0
PP
300 AS_IF([test -z "$PYTHON_LIBS"], [
301 AS_IF([test -z "$PYTHON_CONFIG"], [
302 AC_PATH_PROGS([PYTHON_CONFIG],
303 [python$PYTHON_VERSION-config python-config],
304 [no],
305 [`dirname $PYTHON`])
306 AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])])
307 ])
308 AC_MSG_CHECKING([Python library flags])
309 PYTHON_LIBS=`$PYTHON_CONFIG --libs`
310 AC_MSG_RESULT([$PYTHON_LIBS])
311 ])
312fi
313
c3ddb532
PP
314AS_IF([test "x$BUILT_IN_PLUGINS" = ""])
315
55bb57e0
PP
316AM_CONDITIONAL([WITH_PYTHON_PLUGINS], [test "x$enable_python_plugins" != xno])
317AS_IF(
318 [test "x$enable_python_plugins" != xno],
319 AC_DEFINE_UNQUOTED([WITH_PYTHON_PLUGINS], [1], [Python plugin support.])
320)
321
322AC_ARG_ENABLE([python-bindings-doc],
323 [AC_HELP_STRING([--enable-python-bindings-doc],
324 [generate Python bindings documentation])],
fb4be38a 325 [enable_python_bindings_doc=$enableval], [enable_python_bindings_doc=no])
55bb57e0
PP
326
327AM_CONDITIONAL([BUILD_PYTHON_BINDINGS_DOC], [test "x${enable_python_bindings_doc:-yes}" = xyes])
94a6cea3 328
55bb57e0
PP
329AC_ARG_ENABLE([python-bindings-tests],
330 [AC_HELP_STRING([--enable-python-bindings-tests],
331 [test Python bindings])],
fb4be38a 332 [enable_python_bindings_tests=$enableval], [enable_python_bindings_tests=no])
55bb57e0
PP
333
334AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS_TESTS], [test "x${enable_python_bindings_tests:-yes}" = xyes])
335
336if test "x${enable_python_bindings:-no}" = xno; then
337 if test "x${enable_python_bindings_doc:-yes}" = xyes; then
338 AC_MSG_ERROR([--enable-python-bindings-doc was specified without --enable-python-bindings])
339 fi
340
341 if test "x${enable_python_bindings_tests:-yes}" = xyes; then
342 AC_MSG_ERROR([--enable-python-bindings-tests was specified without --enable-python-bindings])
343 fi
24a3136a
DS
344fi
345
4f5f37d9 346if test "x${enable_python_bindings_doc:-yes}" = xyes; then
17137804
PP
347 AM_CHECK_PYTHON_SPHINX([PYTHON])
348 AS_IF([test "x$PYTHON_SPHINX_EXISTS" = xno],
349 AC_MSG_ERROR([The Sphinx package for Python 3 is required to build Python bindings documentation])
4f5f37d9
PP
350 )
351fi
352
9cf643d1
PP
353if test "x${enable_python_bindings_tests:-yes}" = xyes; then
354 AM_CHECK_PYTHON_TAPPY([PYTHON])
355 AS_IF([test "x$PYTHON_TAPPY_EXISTS" = xno],
356 AC_MSG_ERROR([You need the tappy Python project to test the Python bindings (see <https://github.com/python-tap/tappy>)])
357 )
358fi
359
2748fb3b
AB
360# Set default enable state for debug info.
361# The _enable_debug_info variable is prepended with an underscore to
362# avoid clashing with the one generated by AC_ARG_ENABLE.
363AS_IF([test "x$DEFAULT_ENABLE_DEBUG_INFO" = xyes], [_enable_debug_info=yes], [_enable_debug_info=no])
4fe06062 364
2748fb3b 365# Optional debug info feature
4fe06062
MD
366# Do _not_ indent the help string below (appears in the configure --help
367# output).
368AC_ARG_ENABLE([debug-info],
2748fb3b
AB
369[AC_HELP_STRING([--enable-debug-info], [enable the debug info feature (default on Linux)])]
370[AC_HELP_STRING([--disable-debug-info], [disable the debug info feature (default on OS X and Solaris)])],
371 [AS_IF([test "x$enableval" = xyes], [_enable_debug_info=yes], [_enable_debug_info=no])], [])
c40a57e5 372
2748fb3b 373AM_CONDITIONAL([ENABLE_DEBUG_INFO], [test "x$_enable_debug_info" = xyes])
7433a3a4 374
2748fb3b 375AS_IF([test "x$_enable_debug_info" = xyes], [
ce406405
PP
376 # Check if libelf and libdw are present
377 AC_CHECK_LIB([elf], [elf_version], [], [AC_MSG_ERROR(Missing libelf (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)])
378 AC_CHECK_LIB([dw], [dwarf_begin], [], [AC_MSG_ERROR(Missing libdw (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)])
379 BT_LIB_ELFUTILS([0], [154], [:], [AC_MSG_ERROR(elfutils >= 0.154 is required to use the debug info feature. You can disable this feature using --disable-debug-info.)])
380 AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature])
c40a57e5
AB
381], [])
382
cba174d5
JG
383AC_ARG_VAR([BUILT_IN_PLUGINS], [Statically-link in-tree plug-ins into the babeltrace binary])
384AS_IF([test "x$BUILT_IN_PLUGINS" != x], [
385# Built-in plug-ins are only available when the --disable-shared --enable-static options are used.
386 AS_IF([test "x$enable_static" != "xyes"], [AC_MSG_ERROR(--enable-static must be used to bundle plug-ins in the babeltrace executable)])
387 AS_IF([test "x$enable_shared" = "xyes"], [AC_MSG_ERROR(--disable-shared must be used to bundle plug-ins in the babeltrace executable)])
388 built_in_plugins=yes
389 AC_DEFINE([BT_BUILT_IN_PLUGINS], [1], [Define to 1 to register plug-in attributes in static executable sections])
390])
391AM_CONDITIONAL([BUILT_IN_PLUGINS], [test "x$built_in_plugins" = "xyes"])
392
c3ddb532 393AC_ARG_VAR([BUILT_IN_PYTHON_PLUGIN_SUPPORT], [Statically-link Python plugin support into the babeltrace library])
6fbd4105
PP
394AS_IF([test "x$BUILT_IN_PYTHON_PLUGIN_SUPPORT" != x], [
395# Built-in plug-ins are only available when the --disable-shared --enable-static options are used.
396 AS_IF([test "x$enable_static" != "xyes"], [AC_MSG_ERROR(--enable-static must be used to bundle Python plugin support in the babeltrace executable)])
397 AS_IF([test "x$enable_shared" = "xyes"], [AC_MSG_ERROR(--disable-shared must be used to bundle Python plugin support in the babeltrace executable)])
c3ddb532
PP
398 AS_IF([test "x$enable_python_plugins" = "xno"], [
399 AC_MSG_ERROR([You can't use BUILT_IN_PYTHON_PLUGIN_SUPPORT=1 without --enable-python-plugins.])
400 ])
6fbd4105
PP
401 built_in_python_plugin_support=yes
402 AC_DEFINE([BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [1], [Define to 1 to register plug-in attributes in static executable sections])
403])
404AM_CONDITIONAL([BUILT_IN_PYTHON_PLUGIN_SUPPORT], [test "x$built_in_python_plugin_support" = "xyes"])
405
457c75fc 406PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0])
ac65e355 407
beb0fb75
PP
408# Logging
409AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (VERBOSE, DEBUG, INFO, WARN, ERROR (default), FATAL, or NONE)])
410AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = "x"], [BABELTRACE_MINIMAL_LOG_LEVEL=DEBUG])
411AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "VERBOSE" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "DEBUG" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "INFO" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "WARN" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "ERROR" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "FATAL" && test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "NONE"], [
412 AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use VERBOSE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE.])
413])
414AC_DEFINE_UNQUOTED([BT_LOG_LEVEL], [BT_LOG_$BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level])
415
34d3acc4 416LIBS="$LIBS $GMODULE_LIBS"
38424656 417PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Wformat"
ac65e355
MD
418AC_SUBST(PACKAGE_CFLAGS)
419
38424656
MJ
420DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/include -include config.h"
421AC_SUBST(DEFAULT_INCLUDES)
422
e4d70dc3 423babeltraceincludedir="${includedir}/babeltrace"
70bd0a12
JD
424AC_SUBST(babeltraceincludedir)
425
273b65be
JG
426babeltracectfwriterincludedir="${includedir}/babeltrace/ctf-writer"
427AC_SUBST(babeltracectfwriterincludedir)
428
dc3fffef
PP
429babeltracectfincludedir="${includedir}/babeltrace/ctf"
430AC_SUBST(babeltracectfincludedir)
431
adc315b8
JG
432babeltracectfirincludedir="${includedir}/babeltrace/ctf-ir"
433AC_SUBST(babeltracectfirincludedir)
434
6ee873c6
JG
435babeltracepluginincludedir="${includedir}/babeltrace/plugin"
436AC_SUBST(babeltracepluginincludedir)
437
b2e0c907
PP
438babeltracegraphincludedir="${includedir}/babeltrace/graph"
439AC_SUBST(babeltracegraphincludedir)
592ddb00 440
a150c361 441program_transform_name="s&babeltrace\.bin&babeltrace&;$program_transform_name"
33b34c43 442AC_SUBST(program_transform_name)
591999ca 443
d1dab1d2
PP
444# check for Doxygen
445AC_ARG_ENABLE(
446 [api-doc],
447 [AC_HELP_STRING(
448 [--enable-api-doc],
449 [generate and install HTML API documentation]
450 )],
451 [enable_api_doc=$enableval],
452 [enable_api_doc=no]
453)
454AM_CONDITIONAL([ENABLE_API_DOC], [test "x$enable_api_doc" = "xyes"])
455
456AS_IF([test "x$enable_api_doc" = "xyes"], [
457 DX_DOXYGEN_FEATURE(ON)
458 DX_DOT_FEATURE(OFF)
459 DX_HTML_FEATURE(ON)
460 DX_CHM_FEATURE(OFF)
461 DX_CHI_FEATURE(OFF)
462 DX_MAN_FEATURE(OFF)
463 DX_RTF_FEATURE(OFF)
464 DX_XML_FEATURE(OFF)
465 DX_PDF_FEATURE(OFF)
466 DX_PS_FEATURE(OFF)
467 DX_INIT_DOXYGEN([Babeltrace], [$(srcdir)/Doxyfile], [output])
468])
469
45ff8fe4
MD
470 #TODO: removed, work in progress
471 #bindings/python/Makefile
472 #bindings/python/babeltrace/Makefile
473 #bindings/python/bt2/Makefile
474 #bindings/python/bt2/__init__.py
ac65e355
MD
475AC_CONFIG_FILES([
476 Makefile
1670bffd 477 common/Makefile
9d1e7de0 478 compat/Makefile
8d77550c 479 cli/Makefile
d2c0553c 480 doc/Makefile
dc3fffef
PP
481 doc/api/Makefile
482 doc/api/Doxyfile
4f5f37d9
PP
483 doc/bindings/Makefile
484 doc/bindings/python/Makefile
e7b68776 485 doc/images/Makefile
1eb0c69c 486 lib/Makefile
74f21e2d 487 lib/prio_heap/Makefile
33b34c43 488 lib/plugin/Makefile
c5504f73
PP
489 lib/graph/Makefile
490 lib/graph/notification/Makefile
dc3fffef
PP
491 lib/ctf-ir/Makefile
492 lib/ctf-writer/Makefile
e92927d1 493 include/Makefile
beb0fb75 494 logging/Makefile
24a3136a 495 bindings/Makefile
ac65e355 496 tests/Makefile
a8101b91
PP
497 tests/cli/Makefile
498 tests/cli/intersection/Makefile
aa968dde 499 tests/lib/Makefile
4c3453a1 500 tests/lib/writer/Makefile
cbb9e0b1 501 tests/lib/test-plugin-plugins/Makefile
1833a3d1
CB
502 tests/utils/Makefile
503 tests/utils/tap/Makefile
9cf643d1
PP
504 tests/bindings/Makefile
505 tests/bindings/python/Makefile
506 tests/bindings/python/bt2/Makefile
8deeabc6 507 tests/plugins/Makefile
6aa249b5
MD
508 extras/Makefile
509 extras/valgrind/Makefile
8ca04164 510 plugins/Makefile
38d02a17 511 plugins/ctf/Makefile
06a626b8
JG
512 plugins/ctf/common/Makefile
513 plugins/ctf/common/btr/Makefile
514 plugins/ctf/common/metadata/Makefile
515 plugins/ctf/common/notif-iter/Makefile
d8866baa
PP
516 plugins/ctf/fs-src/Makefile
517 plugins/ctf/fs-sink/Makefile
f3bc2010
JG
518 plugins/ctf/lttng-live/Makefile
519 plugins/text/Makefile
3228cc1d 520 plugins/text/pretty/Makefile
e0dfa761
PP
521 plugins/utils/Makefile
522 plugins/utils/dummy/Makefile
523 plugins/utils/trimmer/Makefile
958f7d11 524 plugins/utils/muxer/Makefile
6fbd4105 525 python-plugin-provider/Makefile
91b73004 526 plugins/libctfcopytrace/Makefile
456a4476 527 plugins/lttng-utils/Makefile
d0acc96d 528 babeltrace.pc
e7a7efdb 529 babeltrace-ctf.pc
ac65e355 530])
c41a7502 531
c1870f57 532#AC_CONFIG_FILES([converter/babeltrace], [chmod +x converter/babeltrace])
d6a1ced5 533AC_CONFIG_FILES([tests/lib/test_ctf_writer_complete], [chmod +x tests/lib/test_ctf_writer_complete])
cbb9e0b1 534AC_CONFIG_FILES([tests/lib/test_plugin_complete], [chmod +x tests/lib/test_plugin_complete])
3413e389
SM
535AC_CONFIG_FILES([tests/lib/test_dwarf_complete], [chmod +x tests/lib/test_dwarf_complete])
536AC_CONFIG_FILES([tests/lib/test_bin_info_complete], [chmod +x tests/lib/test_bin_info_complete])
d6a1ced5 537
8deeabc6
PP
538AC_CONFIG_FILES([tests/plugins/test-utils-muxer-complete], [chmod +x tests/plugins/test-utils-muxer-complete])
539
a8101b91
PP
540AC_CONFIG_FILES([tests/cli/test_trace_read], [chmod +x tests/cli/test_trace_read])
541AC_CONFIG_FILES([tests/cli/intersection/test_intersection], [chmod +x tests/cli/intersection/test_intersection])
542AC_CONFIG_FILES([tests/cli/intersection/bt_python_helper.py])
4c3453a1 543AC_CONFIG_FILES([tests/lib/writer/bt_python_helper.py])
a8101b91 544AC_CONFIG_FILES([tests/cli/test_packet_seq_num], [chmod +x tests/cli/test_packet_seq_num])
c41a7502 545
9cf643d1
PP
546AS_IF([test "x$enable_python" = "xyes"], [
547 AC_CONFIG_FILES(
548 [tests/bindings/python/bt2/testall.sh],
549 [chmod +x tests/bindings/python/bt2/testall.sh]
550 )
551])
552
ac65e355 553AC_OUTPUT
1a0399f9
MJ
554
555#
556# Mini-report on what will be built.
557#
558
559PPRINT_INIT
560PPRINT_SET_INDENT(1)
561PPRINT_SET_TS(38)
562
563AS_ECHO
564AS_ECHO("${PPRINT_COLOR_BLDBLU}Babeltrace $PACKAGE_VERSION$PPRINT_COLOR_RST")
565AS_ECHO
566
4266f2ad 567PPRINT_SUBTITLE([System])
1a0399f9
MJ
568
569# Target architecture we're building for.
570target_arch=$host_cpu
571[
572for f in $CFLAGS; do
573 if test $f = "-m32"; then
574 target_arch="32-bit"
575 elif test $f = "-m64"; then
576 target_arch="64-bit"
577 fi
578done
579]
beb0fb75 580
4266f2ad 581PPRINT_PROP_STRING([Target architecture], $target_arch)
d1dab1d2 582
4266f2ad
PP
583AS_ECHO
584PPRINT_SUBTITLE([Python 3 language support])
55bb57e0 585test "x$enable_python_bindings" = "xyes" && value=1 || value=0
1a0399f9 586PPRINT_PROP_BOOL([Python bindings], $value)
55bb57e0
PP
587test "x$enable_python_plugins" = "xyes" && value=1 || value=0
588PPRINT_PROP_BOOL([Python plugin support], $value)
4266f2ad
PP
589AS_IF([test "x$enable_python_bindings" = "xyes" || test "x$enable_python_plugins" = "xyes"], [
590 PPRINT_PROP_STRING([Python include paths], [$PYTHON_INCLUDE])
591 PPRINT_PROP_STRING([Python libraries], [$PYTHON_LIBS])
592])
55bb57e0 593
4266f2ad
PP
594AS_ECHO
595PPRINT_SUBTITLE([Plugins])
596PPRINT_PROP_BOOL(['ctf' plugin], 1)
597test "x$_enable_debug_info" = "xyes" && value=1 || value=0
598PPRINT_PROP_BOOL(['lttng-utils' plugin], $value)
599PPRINT_PROP_BOOL(['text' plugin], 1)
600PPRINT_PROP_BOOL(['utils' plugin], 1)
601
602AS_ECHO
603PPRINT_SUBTITLE([Built-in features])
604test "x$built_in_plugins" = "xyes" && value=1 || value=0
605PPRINT_PROP_BOOL([Built-in plugins], $value)
6fbd4105
PP
606test "x$built_in_python_plugin_support" = "xyes" && value=1 || value=0
607PPRINT_PROP_BOOL([Built-in Python plugin support], $value)
608
4266f2ad
PP
609AS_ECHO
610PPRINT_SUBTITLE([Documentation])
611test "x$enable_api_doc" = "xyes" && value=1 || value=0
612PPRINT_PROP_BOOL([HTML API documentation], $value)
613test "x$enable_python_bindings_doc" = "xyes" && value=1 || value=0
614PPRINT_PROP_BOOL([Python bindings documentation], $value)
1a0399f9 615
4266f2ad
PP
616AS_ECHO
617PPRINT_SUBTITLE([Logging])
618PPRINT_PROP_STRING([Minimal log level], $BABELTRACE_MINIMAL_LOG_LEVEL)
619
620AS_ECHO
621PPRINT_SUBTITLE([Testing])
622test "x$enable_python_bindings_tests" = "xyes" && value=1 || value=0
623PPRINT_PROP_BOOL([Python bindings tests], $value)
1a0399f9
MJ
624
625report_bindir="`eval eval echo $bindir`"
626report_libdir="`eval eval echo $libdir`"
4266f2ad 627report_sysconfdif="`eval eval echo $sysconfdir`"
1a0399f9
MJ
628
629# Print the bindir and libdir this `make install' will install into.
630AS_ECHO
631PPRINT_SUBTITLE([Install directories])
632PPRINT_PROP_STRING([Binaries], [$report_bindir])
633PPRINT_PROP_STRING([Libraries], [$report_libdir])
4266f2ad
PP
634PPRINT_PROP_STRING([Plugins], [$report_libdir/babeltrace/plugins])
635PPRINT_PROP_STRING([Configuration], [$report_sysconfdif])
This page took 0.07324 seconds and 4 git commands to generate.