Commit | Line | Data |
---|---|---|
b007e40b JG |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
de8bce8a MJ |
3 | dnl Copyright (c) 2017 EfficiOS, Inc. |
4 | dnl | |
5 | dnl Permission is hereby granted, free of charge, to any person obtaining a copy | |
6 | dnl of this software and associated documentation files (the "Software"), to deal | |
7 | dnl in the Software without restriction, including without limitation the rights | |
8 | dnl to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
9 | dnl copies of the Software, and to permit persons to whom the Software is | |
10 | dnl furnished to do so, subject to the following conditions: | |
11 | dnl | |
12 | dnl The above copyright notice and this permission notice shall be included in | |
13 | dnl all copies or substantial portions of the Software. | |
14 | dnl | |
15 | dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 | dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 | dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
18 | dnl AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 | dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 | dnl OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
21 | dnl SOFTWARE. | |
22 | ||
23 | ## ## | |
24 | ## Autoconf base setup ## | |
25 | ## ## | |
26 | ||
9d594903 | 27 | AC_PREREQ([2.50]) |
de8bce8a | 28 | |
a2edfc7d PP |
29 | m4_define([bt_version_major], [2]) |
30 | m4_define([bt_version_minor], [0]) | |
71d8a837 | 31 | m4_define([bt_version_patch], [4]) |
41e53c9e | 32 | m4_define([bt_version_dev_stage], []) |
19e20ba9 | 33 | m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_dev_stage) |
41e53c9e | 34 | m4_define([bt_version_name], [Amqui]) |
de8bce8a | 35 | |
f1598ebf | 36 | AC_INIT([babeltrace2], bt_version, [jeremie dot galarneau at efficios dot com], [], [https://efficios.com/babeltrace/]) |
41e53c9e | 37 | AC_PROG_SED |
3fbccce7 MD |
38 | |
39 | # Following the numbering scheme proposed by libtool for the library version | |
40 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html | |
63976d98 MJ |
41 | m4_define([bt_lib_version_current], [0]) |
42 | m4_define([bt_lib_version_revision], [0]) | |
43 | m4_define([bt_lib_version_age], [0]) | |
44 | m4_define([bt_lib_version], bt_lib_version_current[:]bt_lib_version_revision[:]bt_lib_version_age) | |
45 | ||
41e53c9e JG |
46 | bt_version_description="Amqui (/ɒmkwiː/) is a town in eastern Québec, Canada, at the base of the Gaspé peninsula in Bas-Saint-Laurent. Located at the confluence of the Humqui and Matapédia Rivers, its proximity to woodlands makes it a great destination for outdoor activities such as camping, hiking, and mountain biking." |
47 | bt_version_description_c_safe=$(echo $bt_version_description | $SED 's/"/\\"/g') | |
48 | ||
63976d98 | 49 | AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_lib_version) |
3fbccce7 | 50 | |
57952005 | 51 | AC_CONFIG_HEADERS([src/common/config.h]) |
ac65e355 | 52 | AC_CONFIG_AUX_DIR([config]) |
80e2fb15 MJ |
53 | AC_CONFIG_MACRO_DIR([m4]) |
54 | ||
63976d98 MJ |
55 | AC_DEFINE([BT_VERSION_MAJOR], bt_version_major, [Babeltrace major version]) |
56 | AC_DEFINE([BT_VERSION_MINOR], bt_version_minor, [Babeltrace minor version]) | |
57 | AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace patch version]) | |
19e20ba9 | 58 | AC_DEFINE([BT_VERSION_DEV_STAGE], ["]bt_version_dev_stage["], [Babeltrace version development stage (can be empty)]) |
fbc5b307 | 59 | AC_DEFINE([BT_VERSION_NAME], ["]bt_version_name["], [Babeltrace version name]) |
41e53c9e | 60 | AC_DEFINE_UNQUOTED([BT_VERSION_DESCRIPTION], ["$bt_version_description_c_safe"], [Babeltrace version description]) |
a2edfc7d | 61 | |
ac65e355 MD |
62 | AC_CANONICAL_TARGET |
63 | AC_CANONICAL_HOST | |
80e2fb15 | 64 | |
de8bce8a MJ |
65 | |
66 | ## ## | |
67 | ## Automake base setup ## | |
68 | ## ## | |
69 | ||
392df1b7 | 70 | AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc]) |
99e3ba41 | 71 | AM_MAINTAINER_MODE([enable]) |
ac65e355 | 72 | |
80e2fb15 MJ |
73 | # Enable silent rules if available (Introduced in AM 1.11) |
74 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | |
0671bd13 | 75 | |
3d5e9596 | 76 | |
de8bce8a MJ |
77 | ## ## |
78 | ## OS specific defaults ## | |
79 | ## ## | |
80 | ||
81 | MINGW32=no | |
58f6d595 | 82 | DEFAULT_ENABLE_DEBUG_INFO=yes |
de8bce8a MJ |
83 | LT_NO_UNDEFINED="" |
84 | AS_CASE([$host_os], | |
85 | [solaris*|darwin*], | |
86 | [ | |
87 | DEFAULT_ENABLE_DEBUG_INFO=no | |
88 | ], | |
649b5be0 MJ |
89 | [freebsd*], |
90 | [ | |
91 | DEFAULT_ENABLE_DEBUG_INFO=no | |
92 | ], | |
de8bce8a MJ |
93 | [cygwin*], |
94 | [ | |
95 | DEFAULT_ENABLE_DEBUG_INFO=no | |
96 | LT_NO_UNDEFINED="-no-undefined" | |
97 | ], | |
98 | [mingw*], | |
99 | [ | |
100 | MINGW32=yes | |
101 | DEFAULT_ENABLE_DEBUG_INFO=no | |
102 | LT_NO_UNDEFINED="-no-undefined" | |
103 | ] | |
104 | ) | |
105 | ||
106 | AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"]) | |
107 | AC_SUBST(LT_NO_UNDEFINED) | |
108 | ||
109 | ||
110 | ## ## | |
111 | ## C compiler checks ## | |
112 | ## ## | |
113 | ||
80e2fb15 | 114 | AC_USE_SYSTEM_EXTENSIONS |
217108a9 | 115 | AC_SYS_LARGEFILE |
de8bce8a MJ |
116 | |
117 | # Choose the c compiler | |
80e2fb15 | 118 | AC_PROG_CC |
217108a9 | 119 | |
de8bce8a MJ |
120 | # Make sure the c compiler supports C99 |
121 | AC_PROG_CC_C99([], [AC_MSG_ERROR([The compiler does not support C99])]) | |
ac65e355 | 122 | |
de8bce8a | 123 | # Make sure the c compiler supports __attributes__ |
ec8add54 | 124 | AX_C___ATTRIBUTE__ |
de8bce8a MJ |
125 | AS_IF([test "x$ax_cv___attribute__" != "xyes"], |
126 | [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])]) | |
ec8add54 | 127 | |
de8bce8a MJ |
128 | # Make sur we have pthread support |
129 | AX_PTHREAD([], [AC_MSG_ERROR([Could not configure pthread support])]) | |
130 | ||
131 | # Checks for typedefs, structures, and compiler characteristics. | |
132 | AC_C_INLINE | |
133 | AC_C_TYPEOF | |
134 | AC_TYPE_PID_T | |
135 | AC_TYPE_SIZE_T | |
136 | AC_TYPE_INT16_T | |
137 | AC_TYPE_INT32_T | |
138 | AC_TYPE_INT64_T | |
139 | AC_TYPE_INT8_T | |
140 | AC_TYPE_OFF_T | |
141 | AC_TYPE_SSIZE_T | |
142 | AC_TYPE_UINT16_T | |
143 | AC_TYPE_UINT32_T | |
144 | AC_TYPE_UINT64_T | |
145 | AC_TYPE_UINT8_T | |
146 | AC_CHECK_TYPES([ptrdiff_t]) | |
a2bc83d4 | 147 | |
de8bce8a MJ |
148 | |
149 | ## ## | |
150 | ## Header checks ## | |
151 | ## ## | |
f0d8d709 | 152 | |
f847f3ae MJ |
153 | AC_HEADER_STDBOOL |
154 | AC_CHECK_HEADERS([ \ | |
155 | fcntl.h \ | |
156 | float.h \ | |
1307d39e | 157 | ftw.h \ |
f847f3ae MJ |
158 | libintl.h \ |
159 | limits.h \ | |
160 | malloc.h \ | |
161 | netdb.h \ | |
162 | netinet/in.h \ | |
163 | stddef.h \ | |
164 | sys/socket.h \ | |
de8bce8a | 165 | sys/time.h |
f847f3ae | 166 | ]) |
80e2fb15 | 167 | |
de8bce8a MJ |
168 | |
169 | ## ## | |
170 | ## Linker checks ## | |
171 | ## ## | |
172 | ||
173 | # Check if the linker supports no-as-needed | |
174 | AX_APPEND_LINK_FLAGS([-Wl,--no-as-needed], [LD_NO_AS_NEEDED]) | |
175 | AC_SUBST([LD_NO_AS_NEEDED]) | |
176 | ||
11cc4f3d MJ |
177 | # Check if the linker supports whole-archive |
178 | AX_CHECK_LINK_FLAG([-Wl,--whole-archive,--no-whole-archive], | |
179 | [ | |
180 | AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,--whole-archive,]) | |
181 | AC_SUBST([LD_NO_WHOLE_ARCHIVE], [,--no-whole-archive]) | |
182 | ],[ | |
183 | # Fallback to force_load for the macOS linker | |
184 | AX_CHECK_LINK_FLAG([-Wl,-force_load], | |
185 | [ | |
186 | AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,-force_load,]) | |
187 | AC_SUBST([LD_NO_WHOLE_ARCHIVE], []) | |
188 | ],[ | |
189 | AC_MSG_WARN([Can't find a linker option to force the inclusion of the static plugin archive objects.]) | |
190 | ] | |
191 | ) | |
192 | ] | |
193 | ) | |
194 | ||
de8bce8a MJ |
195 | # Initialize and configure libtool |
196 | LT_INIT([win32-dll]) | |
197 | ||
5abacce0 MJ |
198 | # Check if the linker supports the "notext" keyword |
199 | AX_CHECK_LINK_FLAG([-Wl,-z,notext],[ | |
200 | AC_SUBST([LD_NOTEXT], [-Wl,-z,notext]) | |
201 | ]) | |
202 | ||
de8bce8a MJ |
203 | |
204 | ## ## | |
205 | ## Programs checks ## | |
206 | ## ## | |
207 | ||
208 | AC_PROG_MAKE_SET | |
209 | AC_PROG_MKDIR_P | |
210 | AC_PROG_LN_S | |
fbc5b307 | 211 | AC_PATH_PROG([report_fold], [fold]) |
de8bce8a | 212 | |
8a121625 MJ |
213 | # set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file |
214 | # is not distributed in tarballs | |
215 | AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no]) | |
216 | AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"]) | |
217 | ||
218 | # check for bison | |
219 | AC_PROG_YACC | |
6245c710 | 220 | AX_PROG_BISON_VERSION([2.5], [have_bison=yes]) |
8a121625 MJ |
221 | |
222 | AS_IF([test "x$have_bison" != "xyes"], [ | |
223 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
de8bce8a | 224 | AC_MSG_FAILURE([dnl |
8a121625 MJ |
225 | Bison >= 2.4 is required when building from the Git repository. You can |
226 | set the YACC variable to override automatic detection. | |
227 | ]) | |
228 | ], [ | |
de8bce8a | 229 | AC_MSG_WARN([dnl |
8a121625 MJ |
230 | Missing Bison >= 2.4. Note that the parser files are already built in |
231 | this distribution tarball, so Bison is only needed if you intend to | |
232 | modify their sources. You can set the YACC variable to override automatic | |
233 | detection. | |
234 | ]) | |
235 | ]) | |
236 | ]) | |
237 | AM_CONDITIONAL([HAVE_BISON], [test "x$have_bison" = "xyes"]) | |
238 | ||
239 | # check for flex | |
240 | AC_PROG_LEX | |
241 | AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes]) | |
242 | ||
243 | AS_IF([test "x$have_flex" != "xyes"], [ | |
244 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
de8bce8a | 245 | AC_MSG_FAILURE([dnl |
8a121625 MJ |
246 | Flex >= 2.5.35 is required when building from the Git repository. You can |
247 | set the LEX variable to override automatic detection. | |
248 | ]) | |
249 | ], [ | |
de8bce8a | 250 | AC_MSG_WARN([dnl |
8a121625 MJ |
251 | Missing Flex >= 2.5.35. Note that the lexer files are already built in |
252 | this distribution tarball, so Flex is only needed if you intend to | |
253 | modify their sources. You can set the LEX variable to override automatic | |
254 | detection. | |
255 | ]) | |
256 | ]) | |
257 | ]) | |
258 | AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"]) | |
331d78f5 | 259 | |
e5f5317f | 260 | |
de8bce8a MJ |
261 | ## ## |
262 | ## Library checks ## | |
263 | ## ## | |
ac65e355 | 264 | |
39fa4402 MJ |
265 | # Check what libraries are required on this platform to link sockets programs. |
266 | AX_LIB_SOCKET_NSL | |
267 | ||
791f3058 SM |
268 | # Check for glib >= 2.28 with gmodule support |
269 | AM_PATH_GLIB_2_0([2.28.0], [], | |
270 | AC_MSG_ERROR([glib >= 2.28 is required - download it from ftp://ftp.gtk.org/pub/gtk]), | |
de8bce8a MJ |
271 | [gmodule-no-export] |
272 | ) | |
ac65e355 MD |
273 | |
274 | # Checks for library functions. | |
f847f3ae MJ |
275 | AC_FUNC_ALLOCA |
276 | AC_FUNC_FORK | |
f847f3ae | 277 | AC_FUNC_MKTIME |
ac65e355 | 278 | AC_FUNC_MMAP |
f847f3ae | 279 | AC_FUNC_STRERROR_R |
de8bce8a | 280 | AC_FUNC_STRNLEN |
2f8c0e47 | 281 | AC_CHECK_FUNCS([ \ |
f847f3ae | 282 | atexit \ |
f847f3ae MJ |
283 | dup2 \ |
284 | ftruncate \ | |
285 | gethostbyname \ | |
f847f3ae MJ |
286 | gettimeofday \ |
287 | localtime_r \ | |
288 | memchr \ | |
289 | memset \ | |
290 | mkdir \ | |
291 | mkdtemp \ | |
292 | munmap \ | |
293 | rmdir \ | |
294 | setenv \ | |
295 | socket \ | |
296 | strchr \ | |
297 | strdup \ | |
298 | strerror \ | |
299 | strndup \ | |
300 | strnlen \ | |
301 | strrchr \ | |
de8bce8a | 302 | strstr \ |
f847f3ae MJ |
303 | strtoul \ |
304 | strtoull \ | |
305 | tzset \ | |
2f8c0e47 | 306 | ]) |
ac65e355 | 307 | |
34064482 MJ |
308 | # AC_FUNC_MALLOC causes problems when cross-compiling. |
309 | #AC_FUNC_MALLOC | |
310 | #AC_FUNC_REALLOC | |
311 | ||
f8370579 MD |
312 | # Check for fmemopen |
313 | AC_CHECK_LIB([c], [fmemopen], | |
de8bce8a | 314 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FMEMOPEN], 1, [Has fmemopen support.])] |
f8370579 MD |
315 | ) |
316 | ||
317 | # Check for open_memstream | |
318 | AC_CHECK_LIB([c], [open_memstream], | |
de8bce8a | 319 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_OPEN_MEMSTREAM], 1, [Has open_memstream support.])] |
f8370579 MD |
320 | ) |
321 | ||
a323afb2 JG |
322 | # Check for posix_fallocate |
323 | AC_CHECK_LIB([c], [posix_fallocate], | |
de8bce8a | 324 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_POSIX_FALLOCATE], 1, [Has posix_fallocate support.])] |
a323afb2 JG |
325 | ) |
326 | ||
de8bce8a MJ |
327 | ## ## |
328 | ## User variables ## | |
329 | ## ## | |
330 | ||
331 | AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for Python, bypassing python-config]) | |
90107d51 | 332 | AC_ARG_VAR([PYTHON_LDFLAGS], [Linker flags for Python, bypassing python-config]) |
de8bce8a MJ |
333 | AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) |
334 | ||
4a2a7ed1 MJ |
335 | # BABELTRACE_PLUGINS_DIR: Plugins directory |
336 | AC_ARG_VAR([BABELTRACE_PLUGINS_DIR], [built-in plugins install directory [LIBDIR/babeltrace2/plugins]]) | |
337 | AS_IF([test "x$BABELTRACE_PLUGINS_DIR" = x], [BABELTRACE_PLUGINS_DIR='${libdir}/babeltrace2/plugins']) | |
a094f13b | 338 | |
7b783015 MJ |
339 | # BABELTRACE_PLUGIN_PROVIDERS_DIR: Plugin providers directory |
340 | AC_ARG_VAR([BABELTRACE_PLUGIN_PROVIDERS_DIR], [built-in plugin providers install directory [LIBDIR/babeltrace2/plugin-providers]]) | |
341 | AS_IF([test "x$BABELTRACE_PLUGIN_PROVIDERS_DIR" = x], [BABELTRACE_PLUGIN_PROVIDERS_DIR='${libdir}/babeltrace2/plugin-providers']) | |
342 | ||
de8bce8a | 343 | # BABELTRACE_MINIMAL_LOG_LEVEL: |
d387e24f | 344 | AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (TRACE, DEBUG (default), or INFO)]) |
6657feda | 345 | AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = x], [BABELTRACE_MINIMAL_LOG_LEVEL="DEBUG"]) |
c9ecaa78 | 346 | AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "TRACE" && \ |
de8bce8a | 347 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "DEBUG" && \ |
d387e24f PP |
348 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "INFO"], |
349 | [AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use TRACE, DEBUG, or INFO.])] | |
de8bce8a | 350 | ) |
d82fa4c1 | 351 | AC_DEFINE_UNQUOTED([BT_MINIMAL_LOG_LEVEL], [BT_LOG_$BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level]) |
de8bce8a | 352 | |
d244c559 PP |
353 | # BABELTRACE_DEV_MODE: |
354 | AC_ARG_VAR([BABELTRACE_DEV_MODE], [Set to 1 to enable the Babeltrace developer mode (enables run-time checks for plugin developers)]) | |
355 | AS_IF([test "x$BABELTRACE_DEV_MODE" = x1], [ | |
d244c559 PP |
356 | AC_DEFINE([BT_DEV_MODE], 1, [Babeltrace developer mode]) |
357 | ], [BABELTRACE_DEV_MODE=0]) | |
358 | ||
359 | # BABELTRACE_DEBUG_MODE: | |
360 | AC_ARG_VAR([BABELTRACE_DEBUG_MODE], [Set to 1 to enable the Babeltrace debug mode (enables internal assertions for Babeltrace maintainers)]) | |
361 | AS_IF([test "x$BABELTRACE_DEBUG_MODE" = x1], [ | |
362 | AC_DEFINE([BT_DEBUG_MODE], 1, [Babeltrace debug mode]) | |
363 | ], [BABELTRACE_DEBUG_MODE=0]) | |
364 | ||
de8bce8a MJ |
365 | |
366 | ## ## | |
367 | ## Optionnal features selection ## | |
368 | ## ## | |
24a3136a | 369 | |
de8bce8a MJ |
370 | # Python bindings |
371 | # Disabled by default | |
94a6cea3 | 372 | AC_ARG_ENABLE([python-bindings], |
3530dd01 FD |
373 | [AC_HELP_STRING([--enable-python-bindings], [build the Python bindings])], |
374 | [], dnl AC_ARG_ENABLE will fill enable_python_bindings with the user choice | |
375 | [enable_python_bindings=unspecified] | |
de8bce8a MJ |
376 | ) |
377 | ||
2467456d SM |
378 | # Python bindings documentation |
379 | # Disabled by default | |
380 | AC_ARG_ENABLE([python-bindings-doc], | |
381 | [AC_HELP_STRING([--enable-python-bindings-doc], [build the Python bindings documentation])], | |
382 | [], dnl AC_ARG_ENABLE will fill enable_python_bindings_doc with the user choice | |
383 | [enable_python_bindings_doc=no] | |
384 | ) | |
385 | ||
de8bce8a MJ |
386 | # Python plugins |
387 | # Disabled by default | |
388 | AC_ARG_ENABLE([python-plugins], | |
18c9df91 FD |
389 | [AC_HELP_STRING([--enable-python-plugins], [enable the Python plugins support for the library and converter])] |
390 | dnl AC_ARG_ENABLE will fill enable_python_plugins with the user choice | |
de8bce8a MJ |
391 | ) |
392 | ||
393 | # Debug info | |
394 | # Enabled by default, except on some platforms | |
395 | AC_ARG_ENABLE([debug-info], | |
396 | [AC_HELP_STRING([--disable-debug-info], [disable the debug info support (default on macOS, Solaris and Windows)])], | |
397 | [], dnl AC_ARG_ENABLE will fill enable_debug_info with the user choice | |
398 | [enable_debug_info="$DEFAULT_ENABLE_DEBUG_INFO"] | |
399 | ) | |
400 | ||
401 | # API documentation | |
402 | # Disabled by default | |
403 | AC_ARG_ENABLE([api-doc], | |
404 | [AC_HELP_STRING([--enable-api-doc], [build the HTML API documentation])], | |
18c9df91 | 405 | [enable_api_doc=$enableval] |
de8bce8a MJ |
406 | ) |
407 | ||
408 | # Built-in plugins | |
409 | # Disabled by default | |
410 | AC_ARG_ENABLE([built-in-plugins], | |
18c9df91 FD |
411 | [AC_HELP_STRING([--enable-built-in-plugins], [Statically-link in-tree plug-ins into the babeltrace2 executable])] |
412 | dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice | |
de8bce8a MJ |
413 | ) |
414 | ||
415 | # Built-in python plugin support | |
416 | # Disabled by default | |
417 | AC_ARG_ENABLE([built-in-python-plugin-support], | |
18c9df91 FD |
418 | [AC_HELP_STRING([--enable-built-in-python-plugin-support], [Statically-link Python plugin support into the babeltrace library])] |
419 | dnl AC_ARG_ENABLE will fill enable_built_in_python_plugin_support with the user choice | |
de8bce8a MJ |
420 | ) |
421 | ||
838dd456 PP |
422 | # Man pages |
423 | # Enabled by default | |
424 | AC_ARG_ENABLE([man-pages], | |
425 | [AS_HELP_STRING([--disable-man-pages], [Do not build and install man pages (already built in a distributed tarball])], | |
18c9df91 | 426 | [], dnl AC_ARG_ENABLE will fill enable_man_pages with the user choice |
838dd456 PP |
427 | [enable_man_pages=yes] |
428 | ) | |
429 | ||
de8bce8a MJ |
430 | |
431 | # Set automake variables for optionnal feature conditionnals in Makefile.am | |
432 | AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test "x$enable_python_bindings" = xyes]) | |
2467456d | 433 | AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS_DOC], [test "x$enable_python_bindings_doc" = xyes]) |
de8bce8a MJ |
434 | AM_CONDITIONAL([ENABLE_PYTHON_PLUGINS], [test "x$enable_python_plugins" = xyes]) |
435 | AM_CONDITIONAL([ENABLE_DEBUG_INFO], [test "x$enable_debug_info" = xyes]) | |
436 | AM_CONDITIONAL([ENABLE_API_DOC], [test "x$enable_api_doc" = xyes]) | |
437 | AM_CONDITIONAL([ENABLE_BUILT_IN_PLUGINS], [test "x$enable_built_in_plugins" = xyes]) | |
438 | AM_CONDITIONAL([ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [test "x$enable_built_in_python_plugin_support" = xyes]) | |
838dd456 | 439 | AM_CONDITIONAL([ENABLE_MAN_PAGES], [test "x$enable_man_pages" = xyes]) |
b789e85d | 440 | AM_CONDITIONAL([ENABLE_PYTHON_COMMON_DEPS], [test "x$enable_python_bindings" = xyes || test "x$enable_python_plugins" = xyes]) |
de8bce8a MJ |
441 | |
442 | # Set defines for optionnal features conditionnals in the source code | |
443 | ||
444 | ## jgalar: still used? | |
445 | AS_IF([test "x$enable_python_plugins" = xyes], | |
446 | [AC_DEFINE([PYTHON_PLUGINS], [1], [Python plugin support.])] | |
447 | ) | |
448 | ||
449 | AS_IF([test "x$enable_debug_info" = xyes], | |
450 | [AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature])] | |
451 | ) | |
452 | ||
453 | AS_IF([test "x$enable_built_in_plugins" = xyes], | |
454 | [AC_DEFINE([BT_BUILT_IN_PLUGINS], [1], [Define to 1 to register plug-in attributes in static executable sections])] | |
455 | ) | |
456 | ||
457 | AS_IF([test "x$enable_built_in_python_plugin_support" = xyes], | |
458 | [AC_DEFINE([BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [1], [Define to 1 to register plug-in attributes in static executable sections])] | |
459 | ) | |
460 | ||
838dd456 PP |
461 | AS_IF([test "x$enable_debug_info" = xyes], |
462 | [ENABLE_DEBUG_INFO_VAL=1], | |
463 | [ENABLE_DEBUG_INFO_VAL=0] | |
464 | ) | |
465 | ||
466 | AC_SUBST([ENABLE_DEBUG_INFO_VAL]) | |
467 | ||
3530dd01 FD |
468 | # Check for conflicting Python related features user choices. |
469 | AS_IF([test "x$enable_python_plugins" = xyes], | |
470 | [ | |
471 | AS_IF([test "x$enable_python_bindings" = xunspecified], | |
472 | [ | |
473 | # --enable-python-plugins was provided but --enable-python-bindings was | |
474 | # omitted. Turn the Python bindings ON anyway because it's needed to | |
475 | # use the Python plugins. | |
476 | enable_python_bindings=yes | |
477 | ], | |
478 | [ | |
479 | AS_IF([test "x$enable_python_bindings" = xno], | |
480 | [ | |
481 | # --enable-python-plugins _and_ --disable-python-bindings were | |
482 | # used. This is invalid because Python plugins need the Python | |
483 | # bindings to be useful. | |
484 | AC_MSG_ERROR(--enable-python-bindings must be used to support Python plugins) | |
485 | ] | |
486 | ) | |
487 | ] | |
488 | ) | |
489 | ] | |
490 | ) | |
de8bce8a | 491 | |
f6a5e476 | 492 | # Check for conflicting optional features user choices |
de8bce8a | 493 | |
de8bce8a MJ |
494 | AS_IF([test "x$enable_built_in_plugins" = xyes], |
495 | [ | |
496 | # Built-in plug-ins are only available when the --disable-shared --enable-static options are used. | |
142ac9b0 MJ |
497 | AS_IF([test "x$enable_static" != xyes], [AC_MSG_ERROR(--enable-static must be used to bundle plug-ins in the babeltrace2 executable)]) |
498 | AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle plug-ins in the babeltrace2 executable)]) | |
de8bce8a MJ |
499 | ] |
500 | ) | |
501 | ||
502 | AS_IF([test "x$enable_built_in_python_plugin_support" = xyes], | |
503 | [ | |
18c9df91 | 504 | AS_IF([test "x$enable_python_plugins" != xyes], [AC_MSG_ERROR([--enable-python-plugins must be used to bundle Python plugin support in the babeltrace2 executable])]) |
de8bce8a | 505 | # Built-in plug-ins are only available when the --disable-shared --enable-static options are used. |
142ac9b0 MJ |
506 | AS_IF([test "x$enable_static" != xyes], [AC_MSG_ERROR(--enable-static must be used to bundle Python plugin support in the babeltrace2 executable)]) |
507 | AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle Python plugin support in the babeltrace2 executable)]) | |
de8bce8a | 508 | ] |
55bb57e0 | 509 | ) |
9cf643d1 | 510 | |
4f5f37d9 | 511 | |
de8bce8a MJ |
512 | # Check for optionnal features dependencies |
513 | ||
514 | AS_IF([test "x$enable_python_bindings" = xyes], | |
515 | [AX_PKG_SWIG(2.0.0, [], [AC_MSG_ERROR([SWIG 2.0.0 or newer is required to build the python bindings])])] | |
516 | ) | |
517 | ||
b789e85d | 518 | AM_PATH_PYTHON([3.0], [ |
1b39e2de | 519 | AM_PATH_PYTHON_MODULES([PYTHON]) |
b789e85d | 520 | |
1b39e2de JG |
521 | # pythondir is the path where extra modules are to be installed |
522 | pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH | |
b789e85d | 523 | |
1b39e2de JG |
524 | # pyexecdir is the path that contains shared objects used by the extra modules |
525 | pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH | |
b789e85d PP |
526 | |
527 | AS_IF([test -z "$PYTHON_CONFIG"], [ | |
528 | AC_PATH_PROGS([PYTHON_CONFIG], | |
529 | [python$PYTHON_VERSION-config python-config], | |
530 | [], | |
531 | [`dirname $PYTHON`]) | |
24a3136a | 532 | ]) |
b789e85d PP |
533 | |
534 | AS_IF([test -n "$PYTHON_CONFIG"], [ | |
535 | AS_IF([test -z "$PYTHON_INCLUDE"], [ | |
536 | AC_MSG_CHECKING([Python include flags]) | |
537 | PYTHON_INCLUDE=`$PYTHON_CONFIG --includes` | |
538 | AC_MSG_RESULT([$PYTHON_INCLUDE]) | |
539 | ]) | |
540 | ||
541 | AS_IF([test -z "$PYTHON_LDFLAGS"], [ | |
542 | AC_MSG_CHECKING([Python library flags]) | |
612785a3 SM |
543 | # Python 3.8+ requires that we pass --embed to get the -lpython3.x flag. |
544 | AS_IF([! PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags --embed`], [ | |
545 | PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags` | |
546 | ]) | |
b789e85d | 547 | AC_MSG_RESULT([$PYTHON_LDFLAGS]) |
55bb57e0 | 548 | ]) |
55bb57e0 | 549 | ]) |
b789e85d PP |
550 | ], [:]) |
551 | ||
552 | AS_IF([test "$PYTHON" != :], [have_python=yes], [have_python=no]) | |
553 | AS_IF([test -n "$PYTHON_CONFIG"], [have_python_dev=yes], [have_python_dev=no]) | |
554 | ||
555 | AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = xyes]) | |
556 | AM_CONDITIONAL([HAVE_PYTHON_DEV], [test "x$have_python_dev" = xyes]) | |
557 | ||
558 | AS_IF([test "x$enable_python_bindings" = xyes || test "x$enable_python_plugins" = xyes], [ | |
559 | AS_IF([test "x$have_python_dev" = xno], [ | |
560 | AC_MSG_ERROR([Cannot find a suitable python-config. You can override the python-config path with the PYTHON_CONFIG environment variable.]) | |
561 | ]) | |
562 | ]) | |
55bb57e0 | 563 | |
2467456d SM |
564 | AS_IF([test "x$enable_python_bindings_doc" = xyes], |
565 | [ | |
566 | AM_CHECK_PYTHON_SPHINX([PYTHON]) | |
567 | AS_IF([test "x$PYTHON_SPHINX_EXISTS" = xno], [ | |
568 | AC_MSG_ERROR([The Sphinx package for Python 3 is required to build the Python bindings documentation]) | |
569 | ]) | |
570 | ||
571 | AS_IF([test "x$enable_python_bindings" != xyes], [ | |
572 | AC_MSG_ERROR([The Python bindings are required to build their documentation]) | |
573 | ]) | |
574 | ] | |
575 | ) | |
576 | ||
de8bce8a MJ |
577 | AS_IF([test "x$enable_debug_info" = xyes], |
578 | [ | |
579 | # Check if libelf and libdw are present | |
d9796e27 MJ |
580 | 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.)]) |
581 | 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.)]) | |
de8bce8a | 582 | 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.)]) |
d9796e27 | 583 | ELFUTILS_LIBS="-lelf -ldw" |
de8bce8a MJ |
584 | ] |
585 | ) | |
d9796e27 | 586 | AC_SUBST([ELFUTILS_LIBS]) |
6fbd4105 | 587 | |
de8bce8a MJ |
588 | AS_IF([test "x$enable_api_doc" = "xyes"], |
589 | [ | |
590 | DX_DOXYGEN_FEATURE(ON) | |
591 | DX_DOT_FEATURE(OFF) | |
592 | DX_HTML_FEATURE(ON) | |
593 | DX_CHM_FEATURE(OFF) | |
594 | DX_CHI_FEATURE(OFF) | |
595 | DX_MAN_FEATURE(OFF) | |
596 | DX_RTF_FEATURE(OFF) | |
597 | DX_XML_FEATURE(OFF) | |
598 | DX_PDF_FEATURE(OFF) | |
599 | DX_PS_FEATURE(OFF) | |
7704a0af | 600 | DX_INIT_DOXYGEN([Babeltrace 2], [$(builddir)/Doxyfile], [output]) |
de8bce8a MJ |
601 | AS_IF([test -z "$DX_DOXYGEN"], |
602 | [AC_MSG_ERROR([You need doxygen to enable the API documentation])] | |
603 | ) | |
604 | ] | |
605 | ) | |
ac65e355 | 606 | |
838dd456 PP |
607 | have_asciidoc_xmlto=no |
608 | warn_prebuilt_man_pages=no | |
609 | ||
77a4634e MJ |
610 | AC_PATH_PROG([ASCIIDOC], [asciidoc], [no]) |
611 | AC_PATH_PROG([XMLTO], [xmlto], [no]) | |
838dd456 | 612 | |
77a4634e | 613 | AS_IF([test "x$enable_man_pages" = "xyes"], [ |
838dd456 PP |
614 | AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [ |
615 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
616 | # this is an error because we're in the Git repo, which | |
617 | # means the man pages are not already generated for us, | |
618 | # thus asciixmlto are required because we were asked | |
619 | # to build the man pages | |
620 | AC_MSG_ERROR([ | |
621 | You need asciidoc and xmlto to build the Babeltrace man pages. Use | |
622 | --disable-man-pages to disable building the man pages, in which case | |
623 | they will not be installed. | |
624 | ]) | |
625 | ], [ | |
626 | # only warn here: since we're in the tarball, the man | |
627 | # pages should already be generated at this point, thus | |
628 | # asciidoc/xmlto are not strictly required | |
629 | warn_prebuilt_man_pages=yes | |
630 | ]) | |
631 | ], [ | |
632 | have_asciidoc_xmlto=yes | |
633 | ]) | |
634 | ]) | |
635 | ||
636 | # export AsciiDoc and xmlto existence | |
637 | AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"]) | |
638 | ||
639 | # a wonderful hack that seems necessary because $libdir is | |
640 | # literally `${exec_prefix}/lib`, and $exec_prefix is set to `NONE` | |
641 | # by autoconf when it's not specified by the user | |
642 | AS_IF([test "x$exec_prefix" = xNONE], [ | |
643 | AS_IF([test "x$prefix" = xNONE], [ | |
644 | PREFIX="$ac_default_prefix" | |
645 | ], [ | |
646 | PREFIX="$prefix" | |
647 | ]) | |
648 | ||
649 | LIBDIR="$PREFIX/lib" | |
650 | ], [ | |
651 | LIBDIR="$libdir" | |
652 | ]) | |
653 | ||
654 | AC_SUBST(LIBDIR) | |
655 | ||
3ed277a6 SM |
656 | # CFLAGS from libraries (the glib ones are needed for the following sizeof |
657 | # test). | |
658 | AM_CFLAGS="${PTHREAD_CFLAGS} ${GLIB_CFLAGS}" | |
38424656 | 659 | |
0ede31e8 MJ |
660 | # Check that the current size_t matches the size that glib thinks it should |
661 | # be. This catches problems on multi-arch where people try to do a 32-bit | |
662 | # build while pointing at 64-bit glib headers. This is a common error because | |
663 | # glib.h is not platform specific but it includes glibconfig.h which is and | |
664 | # is usually installed in a non-standard path. | |
665 | ||
3ed277a6 SM |
666 | # Do this before enabling all the warning flags, as the |
667 | # AC_LANG_PROGRAM-generated program may generate some warning, which makes this | |
668 | # test fail unnecessarily. | |
669 | ||
ecca2f36 MJ |
670 | # Older versions of the pkg-config macros disallows PKG_* in the autoconf |
671 | # output. Specifically allow pkg_config_libdir to be able to print the | |
672 | # error message. | |
673 | m4_pattern_allow([PKG_CONFIG_LIBDIR]) | |
674 | ||
0ede31e8 MJ |
675 | save_CFLAGS=${CFLAGS} |
676 | CFLAGS="${CFLAGS} ${AM_CFLAGS}" | |
677 | AC_COMPILE_IFELSE([ | |
678 | AC_LANG_PROGRAM([dnl | |
679 | #include <glib.h> | |
680 | #include <unistd.h> | |
681 | ], [dnl | |
682 | G_STATIC_ASSERT(sizeof(size_t) == GLIB_SIZEOF_SIZE_T); | |
683 | ]) | |
684 | ],[:],[ | |
685 | AC_MSG_ERROR([dnl | |
686 | sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set | |
687 | PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build | |
688 | target. | |
689 | ]) | |
690 | ]) | |
691 | CFLAGS=${save_CFLAGS} | |
692 | ||
3ed277a6 SM |
693 | # Detect C and LD warning flags supported by the compiler. |
694 | AX_COMPILER_FLAGS( | |
695 | [WARN_CFLAGS], dnl CFLAGS variable name | |
696 | [WARN_LDFLAGS], dnl LDFLAGS variable name (unused for now) | |
697 | [], dnl is-release | |
698 | [], dnl Extra base CFLAGS | |
699 | [ dnl Extra "yes" CFLAGS | |
700 | dnl Disable these flags, either because we don't want them | |
701 | dnl or because we want them but are not ready to enable them | |
702 | dnl yet. | |
703 | -Wno-sign-compare dnl | |
704 | -Wno-inline dnl | |
705 | -Wno-declaration-after-statement dnl | |
706 | -Wno-switch-enum dnl | |
707 | -Wno-switch-default dnl | |
708 | -Wno-packed dnl | |
709 | -Wno-pointer-arith dnl | |
710 | -Wno-format-nonliteral dnl | |
3ed277a6 | 711 | -Wno-double-promotion dnl |
3ed277a6 | 712 | -Wno-cast-align dnl |
622d1206 SM |
713 | dnl |
714 | dnl Some versions of SWIG (like 3.0.12) generate code that produces | |
715 | dnl -Wcast-function-type warnings. This warning is present in gcc >= 8. This | |
716 | dnl combo happens on RHEL/Centos 8, for example. Later versions of SWIG (like | |
717 | dnl 4.0.1) have the correct function signatures to not produce this warning. | |
718 | dnl It's simpler to just disable the warning globally. | |
719 | dnl | |
720 | dnl Note that the Debian/Ubuntu SWIG package 3.0.12-2 contains a local patch to | |
721 | dnl fix this (python-fix-function-cast-warnings.patch), so you won't be able to | |
722 | dnl reproduce the warning using that package. | |
723 | dnl | |
724 | dnl Ref: https://github.com/swig/swig/issues/1259 | |
725 | -Wno-cast-function-type dnl | |
3ed277a6 SM |
726 | ]) |
727 | ||
728 | # CFLAGS from AX_COMPILER_FLAGS. | |
729 | AM_CFLAGS="${AM_CFLAGS} ${WARN_CFLAGS}" | |
730 | ||
731 | # The test used in AX_COMPILER_FLAGS, generated using AC_LANG_PROGRAM, is | |
732 | # written in such a way that it triggers a -Wold-style-definition warning. So | |
733 | # if the user has -Werror in their CFLAGS, that warning flag will end up | |
734 | # disabled, because the test program will not build. | |
735 | # | |
736 | # Enable it here unconditionally. It is supported by GCC >= 4.8 and by Clang | |
737 | # (it is accepted for compatibility although it has no effect), and there is | |
738 | # not reason to not want it. | |
739 | ||
740 | AM_CFLAGS="${AM_CFLAGS} -Wold-style-definition" | |
741 | ||
742 | # We want this one to always be an error. | |
743 | AM_CFLAGS="${AM_CFLAGS} -Werror=implicit-function-declaration" | |
744 | ||
745 | # Done for AM_CFLAGS. | |
746 | AC_SUBST(AM_CFLAGS) | |
747 | ||
748 | # Set global CPPFLAGS in AM_CPPFLAGS | |
749 | AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/src -I\$(top_srcdir)/src -include common/config.h" | |
750 | AC_SUBST(AM_CPPFLAGS) | |
751 | ||
752 | # Add glib to global link libs | |
753 | LIBS="$LIBS $GLIB_LIBS" | |
754 | ||
de8bce8a | 755 | # Abuse autoconf's AC_ARG_PROGRAM output variable 'program_transform_name' |
142ac9b0 | 756 | # to rename babeltrace2.bin to babeltrace2 at install time. |
0a904e93 | 757 | program_transform_name="s&babeltrace2\.bin&babeltrace2&;$program_transform_name" |
33b34c43 | 758 | AC_SUBST(program_transform_name) |
591999ca | 759 | |
ac65e355 | 760 | AC_CONFIG_FILES([ |
57952005 | 761 | doc/api/Makefile |
7704a0af PP |
762 | doc/api/libbabeltrace2/Doxyfile |
763 | doc/api/libbabeltrace2/Makefile | |
2467456d SM |
764 | doc/bindings/Makefile |
765 | doc/bindings/python/Makefile | |
12e02f34 | 766 | doc/contributing-images/Makefile |
57952005 MJ |
767 | doc/Makefile |
768 | doc/man/asciidoc-attrs.conf | |
769 | doc/man/Makefile | |
e92927d1 | 770 | include/Makefile |
57952005 | 771 | Makefile |
7263c7a9 | 772 | src/argpar/Makefile |
77a5caaf | 773 | src/autodisc/Makefile |
57952005 MJ |
774 | src/babeltrace2-ctf-writer.pc |
775 | src/babeltrace2.pc | |
776 | src/bindings/Makefile | |
a90c9738 | 777 | src/bindings/python/bt2/bt2/version.py |
57952005 MJ |
778 | src/bindings/python/bt2/Makefile |
779 | src/bindings/python/bt2/setup.py | |
780 | src/bindings/python/Makefile | |
781 | src/cli/Makefile | |
782 | src/common/Makefile | |
783 | src/compat/Makefile | |
784 | src/ctfser/Makefile | |
785 | src/ctf-writer/Makefile | |
786 | src/fd-cache/Makefile | |
787 | src/lib/graph/Makefile | |
788 | src/lib/graph/message/Makefile | |
789 | src/lib/Makefile | |
790 | src/lib/plugin/Makefile | |
791 | src/lib/prio-heap/Makefile | |
792 | src/lib/trace-ir/Makefile | |
793 | src/logging/Makefile | |
794 | src/Makefile | |
9240924b FD |
795 | src/plugins/common/Makefile |
796 | src/plugins/common/muxing/Makefile | |
b7fa35fc | 797 | src/plugins/common/param-validation/Makefile |
57952005 MJ |
798 | src/plugins/ctf/common/bfcr/Makefile |
799 | src/plugins/ctf/common/Makefile | |
800 | src/plugins/ctf/common/metadata/Makefile | |
801 | src/plugins/ctf/common/msg-iter/Makefile | |
57952005 MJ |
802 | src/plugins/ctf/fs-sink/Makefile |
803 | src/plugins/ctf/fs-src/Makefile | |
804 | src/plugins/ctf/lttng-live/Makefile | |
805 | src/plugins/ctf/Makefile | |
806 | src/plugins/lttng-utils/debug-info/Makefile | |
807 | src/plugins/lttng-utils/Makefile | |
808 | src/plugins/Makefile | |
809 | src/plugins/text/dmesg/Makefile | |
810 | src/plugins/text/Makefile | |
811 | src/plugins/text/pretty/Makefile | |
a0bcd369 | 812 | src/plugins/text/details/Makefile |
57952005 MJ |
813 | src/plugins/utils/counter/Makefile |
814 | src/plugins/utils/dummy/Makefile | |
815 | src/plugins/utils/Makefile | |
816 | src/plugins/utils/muxer/Makefile | |
817 | src/plugins/utils/trimmer/Makefile | |
2d7aa9b6 | 818 | src/py-common/Makefile |
57952005 | 819 | src/python-plugin-provider/Makefile |
f956eb2d | 820 | src/param-parse/Makefile |
bed8ebb9 | 821 | src/string-format/Makefile |
ec3e1721 | 822 | tests/bitfield/Makefile |
e40bd1f0 | 823 | tests/ctf-writer/Makefile |
aa968dde | 824 | tests/lib/Makefile |
cbb9e0b1 | 825 | tests/lib/test-plugin-plugins/Makefile |
57952005 | 826 | tests/Makefile |
b7fa35fc | 827 | tests/param-validation/Makefile |
57952005 | 828 | tests/plugins/Makefile |
130858eb PP |
829 | tests/plugins/src.ctf.fs/Makefile |
830 | tests/plugins/src.ctf.fs/succeed/Makefile | |
eba776e3 FD |
831 | tests/plugins/sink.ctf.fs/Makefile |
832 | tests/plugins/sink.ctf.fs/succeed/Makefile | |
82c537ae | 833 | tests/plugins/flt.lttng-utils.debug-info/Makefile |
241aad0a FD |
834 | tests/plugins/flt.utils.muxer/Makefile |
835 | tests/plugins/flt.utils.muxer/succeed/Makefile | |
b7cbc799 | 836 | tests/plugins/flt.utils.trimmer/Makefile |
1833a3d1 CB |
837 | tests/utils/Makefile |
838 | tests/utils/tap/Makefile | |
ac65e355 | 839 | ]) |
c41a7502 | 840 | |
ac65e355 | 841 | AC_OUTPUT |
1a0399f9 MJ |
842 | |
843 | # | |
844 | # Mini-report on what will be built. | |
845 | # | |
846 | ||
847 | PPRINT_INIT | |
848 | PPRINT_SET_INDENT(1) | |
849 | PPRINT_SET_TS(38) | |
850 | ||
851 | AS_ECHO | |
fbc5b307 PP |
852 | |
853 | AS_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 |
859 | AS_ECHO |
860 | ||
41e53c9e | 861 | AS_IF([test -n "$bt_version_description"], [ |
fbc5b307 | 862 | AS_IF([test -n "$report_fold"], [ |
41e53c9e | 863 | AS_ECHO("`AS_ECHO("$bt_version_description") | $report_fold -s`") |
fbc5b307 | 864 | ], [ |
41e53c9e | 865 | AS_ECHO("$bt_version_description") |
fbc5b307 PP |
866 | ]) |
867 | ||
868 | AS_ECHO | |
869 | ]) | |
870 | ||
4266f2ad | 871 | PPRINT_SUBTITLE([System]) |
1a0399f9 MJ |
872 | |
873 | # Target architecture we're building for. | |
874 | target_arch=$host_cpu | |
875 | [ | |
876 | for 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 | |
882 | done | |
883 | ] | |
beb0fb75 | 884 | |
4266f2ad | 885 | PPRINT_PROP_STRING([Target architecture], $target_arch) |
d1dab1d2 | 886 | |
4266f2ad PP |
887 | AS_ECHO |
888 | PPRINT_SUBTITLE([Python 3 language support]) | |
b789e85d PP |
889 | test "x$have_python" = "xyes" && value=1 || value=0 |
890 | PPRINT_PROP_BOOL([Have Python interpreter], $value) | |
891 | test "x$have_python_dev" = "xyes" && value=1 || value=0 | |
892 | PPRINT_PROP_BOOL([Have Python development libraries], $value) | |
55bb57e0 | 893 | test "x$enable_python_bindings" = "xyes" && value=1 || value=0 |
1a0399f9 | 894 | PPRINT_PROP_BOOL([Python bindings], $value) |
55bb57e0 PP |
895 | test "x$enable_python_plugins" = "xyes" && value=1 || value=0 |
896 | PPRINT_PROP_BOOL([Python plugin support], $value) | |
b789e85d PP |
897 | AS_IF([test "x$have_python" = "xyes"], [ |
898 | PPRINT_PROP_STRING([Python interpreter path], [$PYTHON]) | |
899 | ]) | |
900 | AS_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]) |
90107d51 | 903 | PPRINT_PROP_STRING([Python linker flags], [$PYTHON_LDFLAGS]) |
b789e85d PP |
904 | ]) |
905 | AS_IF([test "x$enable_python_bindings" = "xyes"], [ | |
03719f0a SM |
906 | PPRINT_PROP_STRING([SWIG executable], [$SWIG]) |
907 | PPRINT_PROP_STRING([SWIG library], [$SWIG_LIB]) | |
4266f2ad | 908 | ]) |
55bb57e0 | 909 | |
4266f2ad PP |
910 | AS_ECHO |
911 | PPRINT_SUBTITLE([Plugins]) | |
912 | PPRINT_PROP_BOOL(['ctf' plugin], 1) | |
de8bce8a | 913 | test "x$enable_debug_info" = "xyes" && value=1 || value=0 |
4266f2ad PP |
914 | PPRINT_PROP_BOOL(['lttng-utils' plugin], $value) |
915 | PPRINT_PROP_BOOL(['text' plugin], 1) | |
916 | PPRINT_PROP_BOOL(['utils' plugin], 1) | |
917 | ||
918 | AS_ECHO | |
919 | PPRINT_SUBTITLE([Built-in features]) | |
de8bce8a | 920 | test "x$enable_built_in_plugins" = "xyes" && value=1 || value=0 |
4266f2ad | 921 | PPRINT_PROP_BOOL([Built-in plugins], $value) |
de8bce8a | 922 | test "x$enable_built_in_python_plugin_support" = "xyes" && value=1 || value=0 |
6fbd4105 PP |
923 | PPRINT_PROP_BOOL([Built-in Python plugin support], $value) |
924 | ||
4266f2ad PP |
925 | AS_ECHO |
926 | PPRINT_SUBTITLE([Documentation]) | |
838dd456 PP |
927 | |
928 | # man pages build enabled/disabled | |
929 | m4_pushdef([build_man_pages_msg], [Build and install man pages]) | |
930 | ||
931 | AS_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 | ], [ | |
944 | PPRINT_PROP_BOOL([build_man_pages_msg], 0) | |
945 | ]) | |
946 | ||
947 | m4_popdef([build_man_pages_msg]) | |
948 | ||
4266f2ad PP |
949 | test "x$enable_api_doc" = "xyes" && value=1 || value=0 |
950 | PPRINT_PROP_BOOL([HTML API documentation], $value) | |
2467456d SM |
951 | test "x$enable_python_bindings_doc" = "xyes" && value=1 || value=0 |
952 | PPRINT_PROP_BOOL([Python bindings documentation], $value) | |
1a0399f9 | 953 | |
4266f2ad PP |
954 | AS_ECHO |
955 | PPRINT_SUBTITLE([Logging]) | |
956 | PPRINT_PROP_STRING([Minimal log level], $BABELTRACE_MINIMAL_LOG_LEVEL) | |
957 | ||
d244c559 PP |
958 | AS_ECHO |
959 | PPRINT_SUBTITLE([Special build modes]) | |
960 | PPRINT_PROP_BOOL([Debug mode], $BABELTRACE_DEBUG_MODE) | |
961 | PPRINT_PROP_BOOL([Developer mode], $BABELTRACE_DEV_MODE) | |
962 | ||
1a0399f9 MJ |
963 | report_bindir="`eval eval echo $bindir`" |
964 | report_libdir="`eval eval echo $libdir`" | |
4266f2ad | 965 | report_sysconfdif="`eval eval echo $sysconfdir`" |
4a2a7ed1 | 966 | report_pluginsdir="`eval eval eval echo $BABELTRACE_PLUGINS_DIR`" |
7b783015 | 967 | report_pluginprovidersdir="`eval eval eval echo $BABELTRACE_PLUGIN_PROVIDERS_DIR`" |
1a0399f9 MJ |
968 | |
969 | # Print the bindir and libdir this `make install' will install into. | |
970 | AS_ECHO | |
971 | PPRINT_SUBTITLE([Install directories]) | |
972 | PPRINT_PROP_STRING([Binaries], [$report_bindir]) | |
973 | PPRINT_PROP_STRING([Libraries], [$report_libdir]) | |
4a2a7ed1 | 974 | PPRINT_PROP_STRING([Plugins], [$report_pluginsdir]) |
7b783015 | 975 | PPRINT_PROP_STRING([Plugin providers], [$report_pluginprovidersdir]) |
4266f2ad | 976 | PPRINT_PROP_STRING([Configuration], [$report_sysconfdif]) |