Add `dev-requirements.txt` for pip
[babeltrace.git] / configure.ac
CommitLineData
0235b0db 1dnl SPDX-License-Identifier: MIT
9ffc0257 2dnl
0235b0db 3dnl Copyright (C) 2017 EfficiOS, Inc.
9ffc0257 4dnl
0235b0db 5dnl Process this file with autoconf to produce a configure script.
9ffc0257
MJ
6
7## ##
8## Autoconf base setup ##
9## ##
10
e97fe75e 11AC_PREREQ([2.69])
9ffc0257 12
a2edfc7d 13m4_define([bt_version_major], [2])
d5427d80 14m4_define([bt_version_minor], [1])
a2edfc7d 15m4_define([bt_version_patch], [0])
d5427d80 16m4_define([bt_version_dev_stage], [-rc1])
2671dfad 17m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_dev_stage)
d5427d80 18m4_define([bt_version_name], [])
9ffc0257 19
e97fe75e 20AC_INIT([babeltrace2],[bt_version],[jeremie dot galarneau at efficios dot com],[],[https://efficios.com/babeltrace/])
3fbccce7
MD
21
22# Following the numbering scheme proposed by libtool for the library version
23# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
7e69c04f
MJ
24m4_define([bt_lib_version_current], [0])
25m4_define([bt_lib_version_revision], [0])
26m4_define([bt_lib_version_age], [0])
27m4_define([bt_lib_version], bt_lib_version_current[:]bt_lib_version_revision[:]bt_lib_version_age)
e97fe75e
MJ
28m4_define([bt_version_description], [])
29m4_define([bt_version_description_c_safe], AS_ESCAPE(bt_version_description))
af597f37 30
7e69c04f 31AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_lib_version)
3fbccce7 32
578e048b 33AC_CONFIG_HEADERS([src/common/config.h])
ac65e355 34AC_CONFIG_AUX_DIR([config])
80e2fb15
MJ
35AC_CONFIG_MACRO_DIR([m4])
36
7e69c04f
MJ
37AC_DEFINE([BT_VERSION_MAJOR], bt_version_major, [Babeltrace major version])
38AC_DEFINE([BT_VERSION_MINOR], bt_version_minor, [Babeltrace minor version])
39AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace patch version])
2671dfad 40AC_DEFINE([BT_VERSION_DEV_STAGE], ["]bt_version_dev_stage["], [Babeltrace version development stage (can be empty)])
aaa8b698 41AC_DEFINE([BT_VERSION_NAME], ["]bt_version_name["], [Babeltrace version name])
e97fe75e 42AC_DEFINE([BT_VERSION_DESCRIPTION], ["]bt_version_description_c_safe["], [Babeltrace version description])
a2edfc7d 43
ac65e355
MD
44AC_CANONICAL_TARGET
45AC_CANONICAL_HOST
80e2fb15 46
9ffc0257
MJ
47
48## ##
49## Automake base setup ##
50## ##
51
e97fe75e 52AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc -Wall -Wno-portability -Werror])
99e3ba41 53AM_MAINTAINER_MODE([enable])
ac65e355 54
e97fe75e
MJ
55# Enable silent rules by default
56AM_SILENT_RULES([yes])
0671bd13 57
3d5e9596 58
9ffc0257
MJ
59## ##
60## OS specific defaults ##
61## ##
62
63MINGW32=no
9ffc0257
MJ
64LT_NO_UNDEFINED=""
65AS_CASE([$host_os],
66 [solaris*|darwin*],
67 [
887d26fa 68 AE_FEATURE_DISABLE([debug-info])
9ffc0257 69 ],
f4f8f798
MJ
70 [freebsd*],
71 [
cbf9cf74 72 AE_FEATURE_DISABLE([debug-info])
f4f8f798 73 ],
9ffc0257
MJ
74 [cygwin*],
75 [
887d26fa 76 AE_FEATURE_DISABLE([debug-info])
9ffc0257
MJ
77 LT_NO_UNDEFINED="-no-undefined"
78 ],
79 [mingw*],
80 [
81 MINGW32=yes
887d26fa 82 AE_FEATURE_DISABLE([debug-info])
9ffc0257
MJ
83 LT_NO_UNDEFINED="-no-undefined"
84 ]
85)
86
87AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"])
88AC_SUBST(LT_NO_UNDEFINED)
89
90
91## ##
92## C compiler checks ##
93## ##
94
9ffc0257 95# Choose the c compiler
e97fe75e 96AC_PROG_CC_STDC
217108a9 97
9ffc0257 98# Make sure the c compiler supports C99
e97fe75e
MJ
99AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])])
100
101# Enable available system extensions and LFS support
102AC_USE_SYSTEM_EXTENSIONS
103AC_SYS_LARGEFILE
ac65e355 104
9ffc0257 105# Make sure the c compiler supports __attributes__
ec8add54 106AX_C___ATTRIBUTE__
9ffc0257
MJ
107AS_IF([test "x$ax_cv___attribute__" != "xyes"],
108 [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
ec8add54 109
9ffc0257
MJ
110# Make sur we have pthread support
111AX_PTHREAD([], [AC_MSG_ERROR([Could not configure pthread support])])
112
113# Checks for typedefs, structures, and compiler characteristics.
114AC_C_INLINE
115AC_C_TYPEOF
116AC_TYPE_PID_T
117AC_TYPE_SIZE_T
118AC_TYPE_INT16_T
119AC_TYPE_INT32_T
120AC_TYPE_INT64_T
121AC_TYPE_INT8_T
122AC_TYPE_OFF_T
123AC_TYPE_SSIZE_T
124AC_TYPE_UINT16_T
125AC_TYPE_UINT32_T
126AC_TYPE_UINT64_T
127AC_TYPE_UINT8_T
128AC_CHECK_TYPES([ptrdiff_t])
a2bc83d4 129
9ffc0257 130
c20049fd
MJ
131## ##
132## C++ compiler checks ##
133## ##
134
135# Require a C++11 compiler without GNU extensions (-std=c++11)
136AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
137
138
9ffc0257
MJ
139## ##
140## Header checks ##
141## ##
f0d8d709 142
f847f3ae
MJ
143AC_HEADER_STDBOOL
144AC_CHECK_HEADERS([ \
145 fcntl.h \
146 float.h \
e1f4c4f7 147 ftw.h \
f847f3ae
MJ
148 libintl.h \
149 limits.h \
150 malloc.h \
151 netdb.h \
152 netinet/in.h \
153 stddef.h \
154 sys/socket.h \
9ffc0257 155 sys/time.h
f847f3ae 156])
80e2fb15 157
9ffc0257
MJ
158
159## ##
160## Linker checks ##
161## ##
162
163# Check if the linker supports no-as-needed
164AX_APPEND_LINK_FLAGS([-Wl,--no-as-needed], [LD_NO_AS_NEEDED])
165AC_SUBST([LD_NO_AS_NEEDED])
166
1244e794
MJ
167# Check if the linker supports whole-archive
168AX_CHECK_LINK_FLAG([-Wl,--whole-archive,--no-whole-archive],
169 [
170 AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,--whole-archive,])
171 AC_SUBST([LD_NO_WHOLE_ARCHIVE], [,--no-whole-archive])
172 ],[
173 # Fallback to force_load for the macOS linker
174 AX_CHECK_LINK_FLAG([-Wl,-force_load],
175 [
176 AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,-force_load,])
177 AC_SUBST([LD_NO_WHOLE_ARCHIVE], [])
178 ],[
179 AC_MSG_WARN([Can't find a linker option to force the inclusion of the static plugin archive objects.])
180 ]
181 )
182 ]
183)
184
5e8a0751
MJ
185# Check if the linker supports the "notext" keyword
186AX_CHECK_LINK_FLAG([-Wl,-z,notext],[
187 AC_SUBST([LD_NOTEXT], [-Wl,-z,notext])
188])
189
9ffc0257
MJ
190
191## ##
192## Programs checks ##
193## ##
194
e97fe75e 195AM_PROG_AR
9ffc0257
MJ
196AC_PROG_MAKE_SET
197AC_PROG_MKDIR_P
198AC_PROG_LN_S
e97fe75e 199AC_PROG_SED
aaa8b698 200AC_PATH_PROG([report_fold], [fold])
9ffc0257 201
540d833d
MJ
202# set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file
203# is not distributed in tarballs
204AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no])
205AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"])
206
207# check for bison
208AC_PROG_YACC
042f640b 209AX_PROG_BISON_VERSION([2.5], [have_bison=yes])
540d833d
MJ
210
211AS_IF([test "x$have_bison" != "xyes"], [
212 AS_IF([test "x$in_git_repo" = "xyes"], [
9ffc0257 213 AC_MSG_FAILURE([dnl
540d833d
MJ
214Bison >= 2.4 is required when building from the Git repository. You can
215set the YACC variable to override automatic detection.
216 ])
217 ], [
9ffc0257 218 AC_MSG_WARN([dnl
540d833d
MJ
219Missing Bison >= 2.4. Note that the parser files are already built in
220this distribution tarball, so Bison is only needed if you intend to
221modify their sources. You can set the YACC variable to override automatic
222detection.
223 ])
224 ])
225])
226AM_CONDITIONAL([HAVE_BISON], [test "x$have_bison" = "xyes"])
227
228# check for flex
229AC_PROG_LEX
230AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes])
231
232AS_IF([test "x$have_flex" != "xyes"], [
233 AS_IF([test "x$in_git_repo" = "xyes"], [
9ffc0257 234 AC_MSG_FAILURE([dnl
540d833d
MJ
235Flex >= 2.5.35 is required when building from the Git repository. You can
236set the LEX variable to override automatic detection.
237 ])
238 ], [
9ffc0257 239 AC_MSG_WARN([dnl
540d833d
MJ
240Missing Flex >= 2.5.35. Note that the lexer files are already built in
241this distribution tarball, so Flex is only needed if you intend to
242modify their sources. You can set the LEX variable to override automatic
243detection.
244 ])
245 ])
246])
247AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"])
331d78f5 248
e97fe75e
MJ
249# Initialize and configure libtool
250LT_INIT([win32-dll])
251
e5f5317f 252
9ffc0257
MJ
253## ##
254## Library checks ##
255## ##
ac65e355 256
39fa4402
MJ
257# Check what libraries are required on this platform to link sockets programs.
258AX_LIB_SOCKET_NSL
259
ef9559ae
SM
260# Check for glib >= 2.28 with gmodule support
261AM_PATH_GLIB_2_0([2.28.0], [],
262 AC_MSG_ERROR([glib >= 2.28 is required - download it from ftp://ftp.gtk.org/pub/gtk]),
9ffc0257
MJ
263 [gmodule-no-export]
264)
ac65e355
MD
265
266# Checks for library functions.
f847f3ae
MJ
267AC_FUNC_ALLOCA
268AC_FUNC_FORK
f847f3ae 269AC_FUNC_MKTIME
ac65e355 270AC_FUNC_MMAP
f847f3ae 271AC_FUNC_STRERROR_R
9ffc0257 272AC_FUNC_STRNLEN
2f8c0e47 273AC_CHECK_FUNCS([ \
f847f3ae 274 atexit \
f847f3ae
MJ
275 dup2 \
276 ftruncate \
277 gethostbyname \
f847f3ae
MJ
278 gettimeofday \
279 localtime_r \
280 memchr \
281 memset \
282 mkdir \
283 mkdtemp \
284 munmap \
285 rmdir \
286 setenv \
287 socket \
288 strchr \
289 strdup \
290 strerror \
291 strndup \
292 strnlen \
293 strrchr \
9ffc0257 294 strstr \
f847f3ae
MJ
295 strtoul \
296 strtoull \
297 tzset \
2f8c0e47 298])
ac65e355 299
dc4cb410
MJ
300# AC_FUNC_MALLOC causes problems when cross-compiling.
301#AC_FUNC_MALLOC
302#AC_FUNC_REALLOC
303
f8370579
MD
304# Check for fmemopen
305AC_CHECK_LIB([c], [fmemopen],
9ffc0257 306 [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FMEMOPEN], 1, [Has fmemopen support.])]
f8370579
MD
307)
308
309# Check for open_memstream
310AC_CHECK_LIB([c], [open_memstream],
9ffc0257 311 [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_OPEN_MEMSTREAM], 1, [Has open_memstream support.])]
f8370579
MD
312)
313
a323afb2
JG
314# Check for posix_fallocate
315AC_CHECK_LIB([c], [posix_fallocate],
9ffc0257 316 [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_POSIX_FALLOCATE], 1, [Has posix_fallocate support.])]
a323afb2
JG
317)
318
887d26fa 319
9ffc0257
MJ
320## ##
321## User variables ##
322## ##
323
324AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for Python, bypassing python-config])
0b9113bf 325AC_ARG_VAR([PYTHON_LDFLAGS], [Linker flags for Python, bypassing python-config])
9ffc0257
MJ
326AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
327
056632bf
MJ
328# BABELTRACE_PLUGINS_DIR: Plugins directory
329AC_ARG_VAR([BABELTRACE_PLUGINS_DIR], [built-in plugins install directory [LIBDIR/babeltrace2/plugins]])
330AS_IF([test "x$BABELTRACE_PLUGINS_DIR" = x], [BABELTRACE_PLUGINS_DIR='${libdir}/babeltrace2/plugins'])
a094f13b 331
b14c7bf1
MJ
332# BABELTRACE_PLUGIN_PROVIDERS_DIR: Plugin providers directory
333AC_ARG_VAR([BABELTRACE_PLUGIN_PROVIDERS_DIR], [built-in plugin providers install directory [LIBDIR/babeltrace2/plugin-providers]])
334AS_IF([test "x$BABELTRACE_PLUGIN_PROVIDERS_DIR" = x], [BABELTRACE_PLUGIN_PROVIDERS_DIR='${libdir}/babeltrace2/plugin-providers'])
335
9ffc0257 336# BABELTRACE_MINIMAL_LOG_LEVEL:
dd22a91f 337AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (TRACE, DEBUG (default), or INFO)])
f7a9ecd3 338AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = x], [BABELTRACE_MINIMAL_LOG_LEVEL="DEBUG"])
ef267d12 339AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "TRACE" && \
9ffc0257 340 test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "DEBUG" && \
dd22a91f
PP
341 test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "INFO"],
342 [AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use TRACE, DEBUG, or INFO.])]
9ffc0257 343)
510400a9 344AC_DEFINE_UNQUOTED([BT_MINIMAL_LOG_LEVEL], [BT_LOG_$BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level])
9ffc0257 345
464ebc31
PP
346# BABELTRACE_DEV_MODE:
347AC_ARG_VAR([BABELTRACE_DEV_MODE], [Set to 1 to enable the Babeltrace developer mode (enables run-time checks for plugin developers)])
348AS_IF([test "x$BABELTRACE_DEV_MODE" = x1], [
464ebc31
PP
349 AC_DEFINE([BT_DEV_MODE], 1, [Babeltrace developer mode])
350], [BABELTRACE_DEV_MODE=0])
5d7e8359 351AM_CONDITIONAL([DEV_MODE], [test "x$BABELTRACE_DEV_MODE" = x1])
464ebc31
PP
352
353# BABELTRACE_DEBUG_MODE:
354AC_ARG_VAR([BABELTRACE_DEBUG_MODE], [Set to 1 to enable the Babeltrace debug mode (enables internal assertions for Babeltrace maintainers)])
355AS_IF([test "x$BABELTRACE_DEBUG_MODE" = x1], [
356 AC_DEFINE([BT_DEBUG_MODE], 1, [Babeltrace debug mode])
357], [BABELTRACE_DEBUG_MODE=0])
358
9ffc0257
MJ
359
360## ##
361## Optionnal features selection ##
362## ##
24a3136a 363
9ffc0257
MJ
364# Python bindings
365# Disabled by default
887d26fa
MJ
366AE_FEATURE_DEFAULT_DISABLE
367AE_FEATURE([python-bindings],[build the Python bindings])
9ffc0257 368
ba64dfcc
SM
369# Python bindings documentation
370# Disabled by default
887d26fa
MJ
371AE_FEATURE_DEFAULT_DISABLE
372AE_FEATURE([python-bindings-doc],[build the Python bindings documentation])
ba64dfcc 373
9ffc0257
MJ
374# Python plugins
375# Disabled by default
887d26fa
MJ
376AE_FEATURE_DEFAULT_DISABLE
377AE_FEATURE([python-plugins],[enable the Python plugins support for the library and converter])
9ffc0257
MJ
378
379# Debug info
380# Enabled by default, except on some platforms
887d26fa
MJ
381AE_FEATURE_DEFAULT_ENABLE
382AE_FEATURE([debug-info],[disable the debug info support (default on macOS, Solaris and Windows)])
9ffc0257
MJ
383
384# API documentation
385# Disabled by default
887d26fa
MJ
386AE_FEATURE_DEFAULT_DISABLE
387AE_FEATURE([api-doc],[build the HTML API documentation])
9ffc0257
MJ
388
389# Built-in plugins
390# Disabled by default
887d26fa
MJ
391AE_FEATURE_DEFAULT_DISABLE
392AE_FEATURE([built-in-plugins],[Statically-link in-tree plug-ins into the babeltrace2 executable])
9ffc0257
MJ
393
394# Built-in python plugin support
395# Disabled by default
887d26fa
MJ
396AE_FEATURE_DEFAULT_DISABLE
397AE_FEATURE([built-in-python-plugin-support],[Statically-link Python plugin support into the babeltrace library])
9ffc0257 398
0659f3af
PP
399# Man pages
400# Enabled by default
887d26fa
MJ
401AE_FEATURE_DEFAULT_ENABLE
402AE_FEATURE([man-pages],[Do not build and install man pages (already built in a distributed tarball])
0659f3af 403
c20049fd 404# When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
887d26fa
MJ
405# Disabled by default
406AE_FEATURE_DEFAULT_DISABLE
407AE_FEATURE([Werror],[Treat compiler warnings as errors.])
9ffc0257 408
9ffc0257 409
887d26fa
MJ
410## ##
411## Check for conflicting features selection ##
412## ##
9ffc0257 413
887d26fa
MJ
414# Check for conflicting Python related features user choices.
415AE_IF_FEATURE_ENABLED([python-plugins], [
416 AE_IF_FEATURE_UNDEF([python-bindings], [
417 # --enable-python-plugins was provided but --enable-python-bindings was
418 # omitted. Turn the Python bindings ON anyway because it's needed to
419 # use the Python plugins.
420 AE_FEATURE_ENABLE([python-bindings])
421 ], [
422 AE_IF_FEATURE_DISABLED([python-bindings], [
423 # --enable-python-plugins _and_ --disable-python-bindings were
424 # used. This is invalid because Python plugins need the Python
425 # bindings to be useful.
426 AC_MSG_ERROR(--enable-python-bindings must be used to support Python plugins)
427 ])
428 ])
429])
9ffc0257 430
887d26fa
MJ
431# Check for conflicting optional features user choices
432AE_IF_FEATURE_ENABLED([built-in-plugins], [
433 # Built-in plug-ins are only available when the --disable-shared --enable-static options are used.
434 AE_IF_FEATURE_NOT_ENABLED([static], [AC_MSG_ERROR(--enable-static must be used to bundle plug-ins in the babeltrace2 executable)])
435 AE_IF_FEATURE_ENABLED([shared], [AC_MSG_ERROR(--disable-shared must be used to bundle plug-ins in the babeltrace2 executable)])
436])
9ffc0257 437
887d26fa
MJ
438AE_IF_FEATURE_ENABLED([built-in-python-plugin-support], [
439 AE_IF_FEATURE_NOT_ENABLED([python-plugins], [AC_MSG_ERROR([--enable-python-plugins must be used to bundle Python plugin support in the babeltrace2 executable])])
440 # Built-in plug-ins are only available when the --disable-shared --enable-static options are used.
441 AE_IF_FEATURE_NOT_ENABLED([static], [AC_MSG_ERROR(--enable-static must be used to bundle Python plugin support in the babeltrace2 executable)])
442 AE_IF_FEATURE_ENABLED([shared], [AC_MSG_ERROR(--disable-shared must be used to bundle Python plugin support in the babeltrace2 executable)])
443])
0659f3af 444
0659f3af 445
887d26fa
MJ
446## ##
447## Set automake variables for optionnal feature conditionnals in Makefile.am ##
448## ##
9ffc0257 449
887d26fa
MJ
450AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], AE_IS_FEATURE_ENABLED([python-bindings]))
451AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS_DOC], AE_IS_FEATURE_ENABLED([python-bindings-doc]))
452AM_CONDITIONAL([ENABLE_PYTHON_PLUGINS], AE_IS_FEATURE_ENABLED([python-plugins]))
453AM_CONDITIONAL([ENABLE_DEBUG_INFO], AE_IS_FEATURE_ENABLED([debug-info]))
454AM_CONDITIONAL([ENABLE_API_DOC], AE_IS_FEATURE_ENABLED([api-doc]))
455AM_CONDITIONAL([ENABLE_BUILT_IN_PLUGINS], AE_IS_FEATURE_ENABLED([built-in-plugins]))
456AM_CONDITIONAL([ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT], AE_IS_FEATURE_ENABLED([built-in-python-plugin-support]))
457AM_CONDITIONAL([ENABLE_MAN_PAGES], AE_IS_FEATURE_ENABLED([man-pages]))
458AM_CONDITIONAL([ENABLE_PYTHON_COMMON_DEPS], AE_IS_FEATURE_ENABLED([python-bindings]) || AE_IS_FEATURE_ENABLED([python-plugins]))
9ffc0257 459
887d26fa
MJ
460
461## ##
462## Set defines for optionnal features conditionnals in the source code ##
463## ##
464
465AE_IF_FEATURE_ENABLED([built-in-plugins],
466 [AC_DEFINE([BT_BUILT_IN_PLUGINS], [1], [Define to 1 to register plug-in attributes in static executable sections])]
9ffc0257
MJ
467)
468
887d26fa
MJ
469AE_IF_FEATURE_ENABLED([built-in-python-plugin-support],
470 [AC_DEFINE([BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [1], [Define to 1 to register plug-in attributes in static executable sections])]
55bb57e0 471)
9cf643d1 472
887d26fa
MJ
473AE_IF_FEATURE_ENABLED([debug-info], [ENABLE_DEBUG_INFO_VAL=1], [ENABLE_DEBUG_INFO_VAL=0])
474AC_SUBST([ENABLE_DEBUG_INFO_VAL])
475
4f5f37d9 476
887d26fa
MJ
477## ##
478## Check for optionnal features dependencies ##
479## ##
9ffc0257 480
887d26fa
MJ
481# The Python bindings require SWIG
482AE_IF_FEATURE_ENABLED([python-plugins],
9ffc0257
MJ
483 [AX_PKG_SWIG(2.0.0, [], [AC_MSG_ERROR([SWIG 2.0.0 or newer is required to build the python bindings])])]
484)
485
887d26fa
MJ
486# Always check for python, we will fail later if some features require it and
487# it's unavailable.
419fff0b 488AM_PATH_PYTHON([3.0], [
e015bae2 489 AE_PATH_PYTHON_MODULES([PYTHON])
419fff0b 490
1b39e2de
JG
491 # pythondir is the path where extra modules are to be installed
492 pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH
419fff0b 493
1b39e2de
JG
494 # pyexecdir is the path that contains shared objects used by the extra modules
495 pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH
419fff0b
PP
496
497 AS_IF([test -z "$PYTHON_CONFIG"], [
498 AC_PATH_PROGS([PYTHON_CONFIG],
499 [python$PYTHON_VERSION-config python-config],
500 [],
501 [`dirname $PYTHON`])
24a3136a 502 ])
419fff0b
PP
503
504 AS_IF([test -n "$PYTHON_CONFIG"], [
505 AS_IF([test -z "$PYTHON_INCLUDE"], [
506 AC_MSG_CHECKING([Python include flags])
507 PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
508 AC_MSG_RESULT([$PYTHON_INCLUDE])
509 ])
510
511 AS_IF([test -z "$PYTHON_LDFLAGS"], [
512 AC_MSG_CHECKING([Python library flags])
2d786d15
SM
513 # Python 3.8+ requires that we pass --embed to get the -lpython3.x flag.
514 AS_IF([! PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags --embed`], [
515 PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
516 ])
419fff0b 517 AC_MSG_RESULT([$PYTHON_LDFLAGS])
55bb57e0 518 ])
55bb57e0 519 ])
419fff0b
PP
520], [:])
521
522AS_IF([test "$PYTHON" != :], [have_python=yes], [have_python=no])
523AS_IF([test -n "$PYTHON_CONFIG"], [have_python_dev=yes], [have_python_dev=no])
524
525AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = xyes])
526AM_CONDITIONAL([HAVE_PYTHON_DEV], [test "x$have_python_dev" = xyes])
527
887d26fa 528AS_IF([AE_IS_FEATURE_ENABLED([python-bindings]) || AE_IS_FEATURE_ENABLED([python-plugins])], [
419fff0b
PP
529 AS_IF([test "x$have_python_dev" = xno], [
530 AC_MSG_ERROR([Cannot find a suitable python-config. You can override the python-config path with the PYTHON_CONFIG environment variable.])
531 ])
532])
55bb57e0 533
887d26fa 534AE_IF_FEATURE_ENABLED([python-bindings-doc],
ba64dfcc 535 [
435aa29a 536 AE_CHECK_PYTHON_SPHINX([PYTHON])
ba64dfcc
SM
537 AS_IF([test "x$PYTHON_SPHINX_EXISTS" = xno], [
538 AC_MSG_ERROR([The Sphinx package for Python 3 is required to build the Python bindings documentation])
539 ])
540
887d26fa 541 AE_IF_FEATURE_NOT_ENABLED([python-bindings], [
ba64dfcc
SM
542 AC_MSG_ERROR([The Python bindings are required to build their documentation])
543 ])
544 ]
545)
546
887d26fa 547AE_IF_FEATURE_ENABLED([debug-info], [
e97fe75e
MJ
548 # Check if libelf and libdw are present
549 PKG_CHECK_MODULES([ELFUTILS], [libelf >= 0.154 libdw >= 0.154],
550 [
551 dnl PKG_CHECK_MODULES defines ELFUTILS_LIBS
552 ],
553 [
1c482ed8
MJ
554 AC_MSG_WARN([pkg-config was unable to find a valid .pc for libelf/libdw. Set PKG_CONFIG_PATH to specify the pkg-config configuration file location.])
555
556 # Turns out SLES12 doesn't bother shipping .pc file for libelf
557 AC_MSG_WARN([Finding libelf without pkg-config.])
558 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.)])
559 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.)])
560 AE_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.)])
561 ELFUTILS_LIBS="-lelf -ldw"
e97fe75e
MJ
562 ])
563])
901e5c12 564AC_SUBST([ELFUTILS_LIBS])
6fbd4105 565
887d26fa 566AE_IF_FEATURE_ENABLED([api-doc],
9ffc0257
MJ
567 [
568 DX_DOXYGEN_FEATURE(ON)
569 DX_DOT_FEATURE(OFF)
570 DX_HTML_FEATURE(ON)
571 DX_CHM_FEATURE(OFF)
572 DX_CHI_FEATURE(OFF)
573 DX_MAN_FEATURE(OFF)
574 DX_RTF_FEATURE(OFF)
575 DX_XML_FEATURE(OFF)
576 DX_PDF_FEATURE(OFF)
577 DX_PS_FEATURE(OFF)
43c59509 578 DX_INIT_DOXYGEN([Babeltrace 2], [$(builddir)/Doxyfile], [output])
9ffc0257
MJ
579 AS_IF([test -z "$DX_DOXYGEN"],
580 [AC_MSG_ERROR([You need doxygen to enable the API documentation])]
581 )
582 ]
583)
ac65e355 584
0659f3af
PP
585have_asciidoc_xmlto=no
586warn_prebuilt_man_pages=no
587
4a9f5414
MJ
588AC_PATH_PROG([ASCIIDOC], [asciidoc], [no])
589AC_PATH_PROG([XMLTO], [xmlto], [no])
0659f3af 590
887d26fa 591AE_IF_FEATURE_ENABLED([man-pages], [
0659f3af
PP
592 AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [
593 AS_IF([test "x$in_git_repo" = "xyes"], [
594 # this is an error because we're in the Git repo, which
595 # means the man pages are not already generated for us,
596 # thus asciixmlto are required because we were asked
597 # to build the man pages
598 AC_MSG_ERROR([
599You need asciidoc and xmlto to build the Babeltrace man pages. Use
600--disable-man-pages to disable building the man pages, in which case
601they will not be installed.
602 ])
603 ], [
604 # only warn here: since we're in the tarball, the man
605 # pages should already be generated at this point, thus
606 # asciidoc/xmlto are not strictly required
607 warn_prebuilt_man_pages=yes
608 ])
609 ], [
610 have_asciidoc_xmlto=yes
611 ])
612])
613
614# export AsciiDoc and xmlto existence
615AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"])
616
617# a wonderful hack that seems necessary because $libdir is
618# literally `${exec_prefix}/lib`, and $exec_prefix is set to `NONE`
619# by autoconf when it's not specified by the user
620AS_IF([test "x$exec_prefix" = xNONE], [
621 AS_IF([test "x$prefix" = xNONE], [
622 PREFIX="$ac_default_prefix"
623 ], [
624 PREFIX="$prefix"
625 ])
626
627 LIBDIR="$PREFIX/lib"
628], [
629 LIBDIR="$libdir"
630])
631
632AC_SUBST(LIBDIR)
633
887d26fa
MJ
634
635
636
02bb4fcc
SM
637# CFLAGS from libraries (the glib ones are needed for the following sizeof
638# test).
639AM_CFLAGS="${PTHREAD_CFLAGS} ${GLIB_CFLAGS}"
c20049fd 640AM_CXXFLAGS="${PTHREAD_CFLAGS} ${GLIB_CFLAGS}"
38424656 641
5b5959d4
MJ
642# Check that the current size_t matches the size that glib thinks it should
643# be. This catches problems on multi-arch where people try to do a 32-bit
644# build while pointing at 64-bit glib headers. This is a common error because
645# glib.h is not platform specific but it includes glibconfig.h which is and
646# is usually installed in a non-standard path.
647
02bb4fcc
SM
648# Do this before enabling all the warning flags, as the
649# AC_LANG_PROGRAM-generated program may generate some warning, which makes this
650# test fail unnecessarily.
651
3d130ada
MJ
652# Older versions of the pkg-config macros disallows PKG_* in the autoconf
653# output. Specifically allow pkg_config_libdir to be able to print the
654# error message.
655m4_pattern_allow([PKG_CONFIG_LIBDIR])
656
5b5959d4
MJ
657save_CFLAGS=${CFLAGS}
658CFLAGS="${CFLAGS} ${AM_CFLAGS}"
659AC_COMPILE_IFELSE([
660 AC_LANG_PROGRAM([dnl
661#include <glib.h>
662#include <unistd.h>
663 ], [dnl
664G_STATIC_ASSERT(sizeof(size_t) == GLIB_SIZEOF_SIZE_T);
665 ])
666],[:],[
667 AC_MSG_ERROR([dnl
668sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set
669PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build
670target.
671 ])
672])
673CFLAGS=${save_CFLAGS}
674
02bb4fcc 675# Detect C and LD warning flags supported by the compiler.
28ba44ad 676
c20049fd
MJ
677# Detect warning flags supported by the C and C++ compilers and append them to
678# WARN_CFLAGS and WARN_CXXFLAGS.
28ba44ad 679#
c20049fd 680m4_define([WARN_FLAGS_LIST], [ dnl
28ba44ad
SM
681 -Wall dnl
682 -Wextra dnl
28ba44ad
SM
683 -Wmissing-prototypes dnl
684 -Wmissing-declarations dnl
685 -Wnull-dereference dnl
686 -Wundef dnl
687 -Wredundant-decls dnl
688 -Wshadow dnl
689 -Wjump-misses-init dnl
8b305066 690 -Wsuggest-attribute=format dnl
28ba44ad
SM
691 -Wtautological-constant-out-of-range-compare dnl
692 -Wnested-externs dnl
693 -Wwrite-strings dnl
694 -Wformat=2 dnl
28ba44ad
SM
695 -Wstrict-aliasing dnl
696 -Wmissing-noreturn dnl
697 -Winit-self dnl
698 -Wduplicated-cond dnl
699 -Wduplicated-branches dnl
700 -Wlogical-op dnl
701 -Wno-unused-parameter dnl
702 -Wno-sign-compare dnl
c29c23a0
SM
703 dnl
704 dnl Some versions of SWIG (like 3.0.12) generate code that produces
705 dnl -Wcast-function-type warnings. This warning is present in gcc >= 8. This
706 dnl combo happens on RHEL/Centos 8, for example. Later versions of SWIG (like
707 dnl 4.0.1) have the correct function signatures to not produce this warning.
708 dnl It's simpler to just disable the warning globally.
709 dnl
710 dnl Note that the Debian/Ubuntu SWIG package 3.0.12-2 contains a local patch to
711 dnl fix this (python-fix-function-cast-warnings.patch), so you won't be able to
712 dnl reproduce the warning using that package.
713 dnl
714 dnl Ref: https://github.com/swig/swig/issues/1259
715 -Wno-cast-function-type dnl
28ba44ad 716 -Wno-missing-field-initializers dnl
c20049fd
MJ
717 ])
718
719# Pass -Werror as an extra flag during the test: this is needed to make the
720# -Wunknown-warning-option diagnostic fatal with clang.
721AC_LANG([C++])
722AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CXXFLAGS], [-Werror])
723AC_LANG([C])
724AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
28ba44ad 725
c20049fd 726AE_IF_FEATURE_ENABLED([Werror], [WARN_CXXFLAGS="${WARN_CXXFLAGS} -Werror"])
887d26fa 727AE_IF_FEATURE_ENABLED([Werror], [WARN_CFLAGS="${WARN_CFLAGS} -Werror"])
02bb4fcc 728
28ba44ad 729# The test used in AX_APPEND_COMPILE_FLAGS, generated using AC_LANG_PROGRAM, is
65679347
SM
730# written in such a way that it triggers warnings with the following warning
731# flags. So they would always end up disabled if we put them there, because
732# the test program would not build.
02bb4fcc 733#
65679347 734# Enable them here unconditionally. They are supported by GCC >= 4.8 and by
c20049fd 735# Clang >= 3.3 (required by the project) and are only valid for C code.
65679347 736WARN_CFLAGS="${WARN_CFLAGS} -Wold-style-definition -Wstrict-prototypes"
02bb4fcc 737
28ba44ad 738# CFLAGS from AX_APPEND_COMPILE_FLAGS.
c20049fd 739AM_CXXFLAGS="${AM_CXXFLAGS} ${WARN_CXXFLAGS}"
28ba44ad 740AM_CFLAGS="${AM_CFLAGS} ${WARN_CFLAGS}"
02bb4fcc 741
c20049fd
MJ
742# Done for AM_CXXFLAGS and AM_CFLAGS.
743AC_SUBST(AM_CXXFLAGS)
02bb4fcc
SM
744AC_SUBST(AM_CFLAGS)
745
746# Set global CPPFLAGS in AM_CPPFLAGS
747AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/src -I\$(top_srcdir)/src -include common/config.h"
748AC_SUBST(AM_CPPFLAGS)
749
750# Add glib to global link libs
751LIBS="$LIBS $GLIB_LIBS"
752
9ffc0257 753# Abuse autoconf's AC_ARG_PROGRAM output variable 'program_transform_name'
ec2c5e50 754# to rename babeltrace2.bin to babeltrace2 at install time.
bb30da78 755program_transform_name="s&babeltrace2\.bin&babeltrace2&;$program_transform_name"
33b34c43 756AC_SUBST(program_transform_name)
591999ca 757
ac65e355 758AC_CONFIG_FILES([
578e048b 759 doc/api/Makefile
43c59509
PP
760 doc/api/libbabeltrace2/Doxyfile
761 doc/api/libbabeltrace2/Makefile
ba64dfcc
SM
762 doc/bindings/Makefile
763 doc/bindings/python/Makefile
f9ded0e0 764 doc/contributing-images/Makefile
578e048b
MJ
765 doc/Makefile
766 doc/man/asciidoc-attrs.conf
767 doc/man/Makefile
e92927d1 768 include/Makefile
578e048b 769 Makefile
fac21c87 770 src/argpar/Makefile
97010665 771 src/autodisc/Makefile
578e048b
MJ
772 src/babeltrace2-ctf-writer.pc
773 src/babeltrace2.pc
774 src/bindings/Makefile
07041daf 775 src/bindings/python/bt2/bt2/version.py
578e048b
MJ
776 src/bindings/python/bt2/Makefile
777 src/bindings/python/bt2/setup.py
778 src/bindings/python/Makefile
779 src/cli/Makefile
780 src/common/Makefile
781 src/compat/Makefile
782 src/ctfser/Makefile
783 src/ctf-writer/Makefile
784 src/fd-cache/Makefile
785 src/lib/graph/Makefile
786 src/lib/graph/message/Makefile
787 src/lib/Makefile
788 src/lib/plugin/Makefile
789 src/lib/prio-heap/Makefile
790 src/lib/trace-ir/Makefile
791 src/logging/Makefile
792 src/Makefile
1aca5200
FD
793 src/plugins/common/Makefile
794 src/plugins/common/muxing/Makefile
d0d4e0ed 795 src/plugins/common/param-validation/Makefile
578e048b
MJ
796 src/plugins/ctf/common/bfcr/Makefile
797 src/plugins/ctf/common/Makefile
798 src/plugins/ctf/common/metadata/Makefile
799 src/plugins/ctf/common/msg-iter/Makefile
578e048b
MJ
800 src/plugins/ctf/fs-sink/Makefile
801 src/plugins/ctf/fs-src/Makefile
802 src/plugins/ctf/lttng-live/Makefile
803 src/plugins/ctf/Makefile
804 src/plugins/lttng-utils/debug-info/Makefile
805 src/plugins/lttng-utils/Makefile
806 src/plugins/Makefile
807 src/plugins/text/dmesg/Makefile
808 src/plugins/text/Makefile
809 src/plugins/text/pretty/Makefile
55478183 810 src/plugins/text/details/Makefile
578e048b
MJ
811 src/plugins/utils/counter/Makefile
812 src/plugins/utils/dummy/Makefile
813 src/plugins/utils/Makefile
814 src/plugins/utils/muxer/Makefile
815 src/plugins/utils/trimmer/Makefile
7085eeaa 816 src/py-common/Makefile
578e048b 817 src/python-plugin-provider/Makefile
5869b179 818 src/param-parse/Makefile
ec532b44 819 src/string-format/Makefile
906ac65f 820 tests/bitfield/Makefile
331731aa 821 tests/ctf-writer/Makefile
aa968dde 822 tests/lib/Makefile
cbb9e0b1 823 tests/lib/test-plugin-plugins/Makefile
5d7e8359 824 tests/lib/conds/Makefile
578e048b 825 tests/Makefile
d0d4e0ed 826 tests/param-validation/Makefile
578e048b 827 tests/plugins/Makefile
e30aed9e
PP
828 tests/plugins/src.ctf.fs/Makefile
829 tests/plugins/src.ctf.fs/succeed/Makefile
4d227882
FD
830 tests/plugins/sink.ctf.fs/Makefile
831 tests/plugins/sink.ctf.fs/succeed/Makefile
66251464 832 tests/plugins/flt.lttng-utils.debug-info/Makefile
38403bf5
FD
833 tests/plugins/flt.utils.muxer/Makefile
834 tests/plugins/flt.utils.muxer/succeed/Makefile
188edac1 835 tests/plugins/flt.utils.trimmer/Makefile
ed30eb8d 836 tests/plugins/sink.text.pretty/Makefile
1833a3d1
CB
837 tests/utils/Makefile
838 tests/utils/tap/Makefile
ac65e355 839])
c41a7502 840
ac65e355 841AC_OUTPUT
1a0399f9
MJ
842
843#
844# Mini-report on what will be built.
845#
846
847PPRINT_INIT
848PPRINT_SET_INDENT(1)
849PPRINT_SET_TS(38)
850
851AS_ECHO
aaa8b698
PP
852
853AS_IF([test -n "bt_version_name"], [
854 AS_ECHO("${PPRINT_COLOR_BLDBLU}Babeltrace $PACKAGE_VERSION \"bt_version_name\"$PPRINT_COLOR_RST")
855], [
856 AS_ECHO("${PPRINT_COLOR_BLDBLU}Babeltrace $PACKAGE_VERSION")
857])
858
1a0399f9
MJ
859AS_ECHO
860
e97fe75e 861AS_IF([test -n "bt_version_description"], [
aaa8b698 862 AS_IF([test -n "$report_fold"], [
e97fe75e 863 AS_ECHO("`AS_ECHO("bt_version_description") | $report_fold -s`")
aaa8b698 864 ], [
e97fe75e 865 AS_ECHO("bt_version_description")
aaa8b698
PP
866 ])
867
868 AS_ECHO
869])
870
4266f2ad 871PPRINT_SUBTITLE([System])
1a0399f9
MJ
872
873# Target architecture we're building for.
874target_arch=$host_cpu
875[
876for f in $CFLAGS; do
877 if test $f = "-m32"; then
878 target_arch="32-bit"
879 elif test $f = "-m64"; then
880 target_arch="64-bit"
881 fi
882done
883]
beb0fb75 884
4266f2ad 885PPRINT_PROP_STRING([Target architecture], $target_arch)
d1dab1d2 886
4266f2ad
PP
887AS_ECHO
888PPRINT_SUBTITLE([Python 3 language support])
419fff0b
PP
889test "x$have_python" = "xyes" && value=1 || value=0
890PPRINT_PROP_BOOL([Have Python interpreter], $value)
891test "x$have_python_dev" = "xyes" && value=1 || value=0
892PPRINT_PROP_BOOL([Have Python development libraries], $value)
55bb57e0 893test "x$enable_python_bindings" = "xyes" && value=1 || value=0
f75e50ab 894PPRINT_PROP_BOOL_CUSTOM([Python bindings], $value, [To enable, use --enable-python-bindings])
55bb57e0 895test "x$enable_python_plugins" = "xyes" && value=1 || value=0
f75e50ab 896PPRINT_PROP_BOOL_CUSTOM([Python plugin support], $value, [To enable, use --enable-python-plugins])
419fff0b
PP
897AS_IF([test "x$have_python" = "xyes"], [
898 PPRINT_PROP_STRING([Python interpreter path], [$PYTHON])
899])
900AS_IF([test "x$have_python_dev" = "xyes"], [
901 PPRINT_PROP_STRING([python-config path], [$PYTHON_CONFIG])
4266f2ad 902 PPRINT_PROP_STRING([Python include paths], [$PYTHON_INCLUDE])
0b9113bf 903 PPRINT_PROP_STRING([Python linker flags], [$PYTHON_LDFLAGS])
419fff0b 904])
887d26fa 905AE_IF_FEATURE_ENABLED([python-bindings], [
8c102541
SM
906 PPRINT_PROP_STRING([SWIG executable], [$SWIG])
907 PPRINT_PROP_STRING([SWIG library], [$SWIG_LIB])
4266f2ad 908])
55bb57e0 909
4266f2ad
PP
910AS_ECHO
911PPRINT_SUBTITLE([Plugins])
912PPRINT_PROP_BOOL(['ctf' plugin], 1)
9ffc0257 913test "x$enable_debug_info" = "xyes" && value=1 || value=0
f75e50ab 914PPRINT_PROP_BOOL_CUSTOM(['lttng-utils' plugin], $value, [To enable, use --enable-debug-info])
4266f2ad
PP
915PPRINT_PROP_BOOL(['text' plugin], 1)
916PPRINT_PROP_BOOL(['utils' plugin], 1)
917
918AS_ECHO
919PPRINT_SUBTITLE([Built-in features])
9ffc0257 920test "x$enable_built_in_plugins" = "xyes" && value=1 || value=0
f75e50ab 921PPRINT_PROP_BOOL_CUSTOM([Built-in plugins], $value, [To enable, use --enable-built-in-plugins])
9ffc0257 922test "x$enable_built_in_python_plugin_support" = "xyes" && value=1 || value=0
f75e50ab 923PPRINT_PROP_BOOL_CUSTOM([Built-in Python plugin support], $value, [To enable, use --enable-built-in-python-plugin-support])
6fbd4105 924
4266f2ad
PP
925AS_ECHO
926PPRINT_SUBTITLE([Documentation])
0659f3af
PP
927
928# man pages build enabled/disabled
929m4_pushdef([build_man_pages_msg], [Build and install man pages])
930
931AS_IF([test "x$enable_man_pages" != "xno"], [
932 AS_IF([test "x$in_git_repo" = "xyes"], [
933 PPRINT_PROP_BOOL([build_man_pages_msg], 1)
934 ], [
935 AS_IF([test "x$have_asciidoc_xmlto" = "xyes"], [
936 PPRINT_PROP_BOOL([build_man_pages_msg], 1)
937 ], [
938 PPRINT_PROP_STRING([build_man_pages_msg],
939 [${PPRINT_COLOR_BLDGRN}yes (already built)],
940 $PPRINT_COLOR_SUBTITLE)
941 ])
942 ])
943], [
f75e50ab 944 PPRINT_PROP_BOOL_CUSTOM([build_man_pages_msg], 0, [To build man pages, use --enable-man-pages])
0659f3af
PP
945])
946
947m4_popdef([build_man_pages_msg])
948
4266f2ad 949test "x$enable_api_doc" = "xyes" && value=1 || value=0
f75e50ab 950PPRINT_PROP_BOOL_CUSTOM([HTML API documentation], $value, [To build documentation, use --enable-api-doc])
ba64dfcc
SM
951test "x$enable_python_bindings_doc" = "xyes" && value=1 || value=0
952PPRINT_PROP_BOOL_CUSTOM([Python bindings documentation], $value, [To build the Python bindings documentation, use --enable-python-bindings-doc])
1a0399f9 953
4266f2ad
PP
954AS_ECHO
955PPRINT_SUBTITLE([Logging])
956PPRINT_PROP_STRING([Minimal log level], $BABELTRACE_MINIMAL_LOG_LEVEL)
957
464ebc31
PP
958AS_ECHO
959PPRINT_SUBTITLE([Special build modes])
f75e50ab
GB
960PPRINT_PROP_BOOL_CUSTOM([Debug mode], $BABELTRACE_DEBUG_MODE, [To enable, set the BABELTRACE_DEBUG_MODE environment variable to 1])
961PPRINT_PROP_BOOL_CUSTOM([Developer mode], $BABELTRACE_DEV_MODE, [To enable, set the BABELTRACE_DEV_MODE environment variable to 1])
464ebc31 962
1a0399f9
MJ
963report_bindir="`eval eval echo $bindir`"
964report_libdir="`eval eval echo $libdir`"
4266f2ad 965report_sysconfdif="`eval eval echo $sysconfdir`"
056632bf 966report_pluginsdir="`eval eval eval echo $BABELTRACE_PLUGINS_DIR`"
b14c7bf1 967report_pluginprovidersdir="`eval eval eval echo $BABELTRACE_PLUGIN_PROVIDERS_DIR`"
1a0399f9
MJ
968
969# Print the bindir and libdir this `make install' will install into.
970AS_ECHO
971PPRINT_SUBTITLE([Install directories])
972PPRINT_PROP_STRING([Binaries], [$report_bindir])
973PPRINT_PROP_STRING([Libraries], [$report_libdir])
056632bf 974PPRINT_PROP_STRING([Plugins], [$report_pluginsdir])
b14c7bf1 975PPRINT_PROP_STRING([Plugin providers], [$report_pluginprovidersdir])
4266f2ad 976PPRINT_PROP_STRING([Configuration], [$report_sysconfdif])
This page took 0.13446 seconds and 4 git commands to generate.