Commit | Line | Data |
---|---|---|
9ffc0257 MJ |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
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]) |
9ffc0257 | 28 | |
a2edfc7d PP |
29 | m4_define([bt_version_major], [2]) |
30 | m4_define([bt_version_minor], [0]) | |
31 | m4_define([bt_version_patch], [0]) | |
aac930e5 | 32 | m4_define([bt_version_extra], [-pre6]) |
a2edfc7d | 33 | m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_extra) |
9ffc0257 MJ |
34 | |
35 | AC_INIT([babeltrace], bt_version, [jeremie dot galarneau at efficios dot com], [], [https://efficios.com/babeltrace/]) | |
3fbccce7 MD |
36 | |
37 | # Following the numbering scheme proposed by libtool for the library version | |
38 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html | |
a2edfc7d | 39 | AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_version_major[:]bt_version_minor[:]bt_version_patch) |
3fbccce7 | 40 | |
05c03100 | 41 | AC_CONFIG_HEADERS([include/config.h]) |
ac65e355 | 42 | AC_CONFIG_AUX_DIR([config]) |
80e2fb15 | 43 | AC_CONFIG_MACRO_DIR([m4]) |
9ffc0257 | 44 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) |
80e2fb15 | 45 | |
a2edfc7d PP |
46 | AC_DEFINE([BT_VERSION_MAJOR], bt_version_major, [Babeltrace library major version]) |
47 | AC_DEFINE([BT_VERSION_MINOR], bt_version_minor, [Babeltrace library minor version]) | |
48 | AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace library patch version]) | |
49 | AC_DEFINE([BT_VERSION_EXTRA], ["]bt_version_extra["], [Babeltrace library extra version]) | |
50 | ||
ac65e355 MD |
51 | AC_CANONICAL_TARGET |
52 | AC_CANONICAL_HOST | |
80e2fb15 | 53 | |
9ffc0257 MJ |
54 | |
55 | ## ## | |
56 | ## Automake base setup ## | |
57 | ## ## | |
58 | ||
05c03100 | 59 | AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-ustar nostdinc]) |
99e3ba41 | 60 | AM_MAINTAINER_MODE([enable]) |
ac65e355 | 61 | |
80e2fb15 MJ |
62 | # Enable silent rules if available (Introduced in AM 1.11) |
63 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | |
0671bd13 | 64 | |
3d5e9596 | 65 | |
9ffc0257 MJ |
66 | ## ## |
67 | ## OS specific defaults ## | |
68 | ## ## | |
69 | ||
70 | MINGW32=no | |
ca9f27f3 | 71 | DEFAULT_ENABLE_DEBUG_INFO=yes |
9ffc0257 MJ |
72 | LT_NO_UNDEFINED="" |
73 | AS_CASE([$host_os], | |
74 | [solaris*|darwin*], | |
75 | [ | |
76 | DEFAULT_ENABLE_DEBUG_INFO=no | |
77 | ], | |
78 | [cygwin*], | |
79 | [ | |
80 | DEFAULT_ENABLE_DEBUG_INFO=no | |
81 | LT_NO_UNDEFINED="-no-undefined" | |
82 | ], | |
83 | [mingw*], | |
84 | [ | |
85 | MINGW32=yes | |
86 | DEFAULT_ENABLE_DEBUG_INFO=no | |
87 | LT_NO_UNDEFINED="-no-undefined" | |
88 | ] | |
89 | ) | |
90 | ||
91 | AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"]) | |
92 | AC_SUBST(LT_NO_UNDEFINED) | |
93 | ||
94 | ||
95 | ## ## | |
96 | ## C compiler checks ## | |
97 | ## ## | |
98 | ||
80e2fb15 | 99 | AC_USE_SYSTEM_EXTENSIONS |
217108a9 | 100 | AC_SYS_LARGEFILE |
9ffc0257 MJ |
101 | |
102 | # Choose the c compiler | |
80e2fb15 | 103 | AC_PROG_CC |
217108a9 | 104 | |
9ffc0257 MJ |
105 | # Make sure the c compiler supports C99 |
106 | AC_PROG_CC_C99([], [AC_MSG_ERROR([The compiler does not support C99])]) | |
ac65e355 | 107 | |
9ffc0257 | 108 | # Make sure the c compiler supports __attributes__ |
ec8add54 | 109 | AX_C___ATTRIBUTE__ |
9ffc0257 MJ |
110 | AS_IF([test "x$ax_cv___attribute__" != "xyes"], |
111 | [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])]) | |
ec8add54 | 112 | |
9ffc0257 MJ |
113 | # Make sur we have pthread support |
114 | AX_PTHREAD([], [AC_MSG_ERROR([Could not configure pthread support])]) | |
115 | ||
116 | # Checks for typedefs, structures, and compiler characteristics. | |
117 | AC_C_INLINE | |
118 | AC_C_TYPEOF | |
119 | AC_TYPE_PID_T | |
120 | AC_TYPE_SIZE_T | |
121 | AC_TYPE_INT16_T | |
122 | AC_TYPE_INT32_T | |
123 | AC_TYPE_INT64_T | |
124 | AC_TYPE_INT8_T | |
125 | AC_TYPE_OFF_T | |
126 | AC_TYPE_SSIZE_T | |
127 | AC_TYPE_UINT16_T | |
128 | AC_TYPE_UINT32_T | |
129 | AC_TYPE_UINT64_T | |
130 | AC_TYPE_UINT8_T | |
131 | AC_CHECK_TYPES([ptrdiff_t]) | |
a2bc83d4 | 132 | |
9ffc0257 MJ |
133 | |
134 | ## ## | |
135 | ## Header checks ## | |
136 | ## ## | |
f0d8d709 | 137 | |
f847f3ae MJ |
138 | AC_HEADER_STDBOOL |
139 | AC_CHECK_HEADERS([ \ | |
140 | fcntl.h \ | |
141 | float.h \ | |
e1f4c4f7 | 142 | ftw.h \ |
f847f3ae MJ |
143 | libintl.h \ |
144 | limits.h \ | |
145 | malloc.h \ | |
146 | netdb.h \ | |
147 | netinet/in.h \ | |
148 | stddef.h \ | |
149 | sys/socket.h \ | |
9ffc0257 | 150 | sys/time.h |
f847f3ae | 151 | ]) |
80e2fb15 | 152 | |
9ffc0257 MJ |
153 | |
154 | ## ## | |
155 | ## Linker checks ## | |
156 | ## ## | |
157 | ||
158 | # Check if the linker supports no-as-needed | |
159 | AX_APPEND_LINK_FLAGS([-Wl,--no-as-needed], [LD_NO_AS_NEEDED]) | |
160 | AC_SUBST([LD_NO_AS_NEEDED]) | |
161 | ||
1244e794 MJ |
162 | # Check if the linker supports whole-archive |
163 | AX_CHECK_LINK_FLAG([-Wl,--whole-archive,--no-whole-archive], | |
164 | [ | |
165 | AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,--whole-archive,]) | |
166 | AC_SUBST([LD_NO_WHOLE_ARCHIVE], [,--no-whole-archive]) | |
167 | ],[ | |
168 | # Fallback to force_load for the macOS linker | |
169 | AX_CHECK_LINK_FLAG([-Wl,-force_load], | |
170 | [ | |
171 | AC_SUBST([LD_WHOLE_ARCHIVE], [-Wl,-force_load,]) | |
172 | AC_SUBST([LD_NO_WHOLE_ARCHIVE], []) | |
173 | ],[ | |
174 | AC_MSG_WARN([Can't find a linker option to force the inclusion of the static plugin archive objects.]) | |
175 | ] | |
176 | ) | |
177 | ] | |
178 | ) | |
179 | ||
9ffc0257 MJ |
180 | # Initialize and configure libtool |
181 | LT_INIT([win32-dll]) | |
182 | ||
183 | ||
184 | ## ## | |
185 | ## Programs checks ## | |
186 | ## ## | |
187 | ||
188 | AC_PROG_MAKE_SET | |
189 | AC_PROG_MKDIR_P | |
190 | AC_PROG_LN_S | |
191 | ||
540d833d MJ |
192 | # set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file |
193 | # is not distributed in tarballs | |
194 | AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no]) | |
195 | AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"]) | |
196 | ||
197 | # check for bison | |
198 | AC_PROG_YACC | |
199 | AX_PROG_BISON_VERSION([2.4], [have_bison=yes]) | |
200 | ||
201 | AS_IF([test "x$have_bison" != "xyes"], [ | |
202 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
9ffc0257 | 203 | AC_MSG_FAILURE([dnl |
540d833d MJ |
204 | Bison >= 2.4 is required when building from the Git repository. You can |
205 | set the YACC variable to override automatic detection. | |
206 | ]) | |
207 | ], [ | |
9ffc0257 | 208 | AC_MSG_WARN([dnl |
540d833d MJ |
209 | Missing Bison >= 2.4. Note that the parser files are already built in |
210 | this distribution tarball, so Bison is only needed if you intend to | |
211 | modify their sources. You can set the YACC variable to override automatic | |
212 | detection. | |
213 | ]) | |
214 | ]) | |
215 | ]) | |
216 | AM_CONDITIONAL([HAVE_BISON], [test "x$have_bison" = "xyes"]) | |
217 | ||
218 | # check for flex | |
219 | AC_PROG_LEX | |
220 | AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes]) | |
221 | ||
222 | AS_IF([test "x$have_flex" != "xyes"], [ | |
223 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
9ffc0257 | 224 | AC_MSG_FAILURE([dnl |
540d833d MJ |
225 | Flex >= 2.5.35 is required when building from the Git repository. You can |
226 | set the LEX variable to override automatic detection. | |
227 | ]) | |
228 | ], [ | |
9ffc0257 | 229 | AC_MSG_WARN([dnl |
540d833d MJ |
230 | Missing Flex >= 2.5.35. Note that the lexer files are already built in |
231 | this distribution tarball, so Flex is only needed if you intend to | |
232 | modify their sources. You can set the LEX variable to override automatic | |
233 | detection. | |
234 | ]) | |
235 | ]) | |
236 | ]) | |
237 | AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"]) | |
331d78f5 | 238 | |
e5f5317f | 239 | |
9ffc0257 MJ |
240 | ## ## |
241 | ## Library checks ## | |
242 | ## ## | |
ac65e355 | 243 | |
39fa4402 MJ |
244 | # Check what libraries are required on this platform to link sockets programs. |
245 | AX_LIB_SOCKET_NSL | |
246 | ||
9ffc0257 MJ |
247 | # Check for glib >= 2.22 with gmodule support |
248 | AM_PATH_GLIB_2_0([2.22.0], [], | |
249 | AC_MSG_ERROR([glib >= 2.22 is required - download it from ftp://ftp.gtk.org/pub/gtk]), | |
250 | [gmodule-no-export] | |
251 | ) | |
ac65e355 MD |
252 | |
253 | # Checks for library functions. | |
f847f3ae MJ |
254 | AC_FUNC_ALLOCA |
255 | AC_FUNC_FORK | |
f847f3ae | 256 | AC_FUNC_MKTIME |
ac65e355 | 257 | AC_FUNC_MMAP |
f847f3ae | 258 | AC_FUNC_STRERROR_R |
9ffc0257 | 259 | AC_FUNC_STRNLEN |
2f8c0e47 | 260 | AC_CHECK_FUNCS([ \ |
f847f3ae | 261 | atexit \ |
f847f3ae MJ |
262 | dup2 \ |
263 | ftruncate \ | |
264 | gethostbyname \ | |
f847f3ae MJ |
265 | gettimeofday \ |
266 | localtime_r \ | |
267 | memchr \ | |
268 | memset \ | |
269 | mkdir \ | |
270 | mkdtemp \ | |
271 | munmap \ | |
272 | rmdir \ | |
273 | setenv \ | |
274 | socket \ | |
275 | strchr \ | |
276 | strdup \ | |
277 | strerror \ | |
278 | strndup \ | |
279 | strnlen \ | |
280 | strrchr \ | |
9ffc0257 | 281 | strstr \ |
f847f3ae MJ |
282 | strtoul \ |
283 | strtoull \ | |
284 | tzset \ | |
2f8c0e47 | 285 | ]) |
ac65e355 | 286 | |
dc4cb410 MJ |
287 | # AC_FUNC_MALLOC causes problems when cross-compiling. |
288 | #AC_FUNC_MALLOC | |
289 | #AC_FUNC_REALLOC | |
290 | ||
60725cf9 MJ |
291 | # First, check for uuid in system libs |
292 | AH_TEMPLATE([BABELTRACE_HAVE_LIBUUID], [Define if you have libuuid support]) | |
4120f662 | 293 | AC_CHECK_FUNCS([uuid_generate], |
4120f662 | 294 | [ |
60725cf9 MJ |
295 | AC_DEFINE([BABELTRACE_HAVE_LIBUUID], [1]) |
296 | UUID_LIBS="" | |
4120f662 MJ |
297 | ], |
298 | [ | |
60725cf9 MJ |
299 | # Then, check if the pkg-config module is available, otherwise explicitly check |
300 | # for libuuid, or uuid support in the C-library. | |
301 | PKG_CHECK_MODULES([UUID], [uuid], | |
2741f55b | 302 | [ |
60725cf9 MJ |
303 | AC_DEFINE([BABELTRACE_HAVE_LIBUUID], [1]) |
304 | dnl PKG_CHECK_MODULES defines UUID_LIBS | |
2741f55b SM |
305 | ], |
306 | [ | |
60725cf9 MJ |
307 | AC_MSG_WARN([pkg-config was unable to find a valid .pc for libuuid. Set PKG_CONFIG_PATH to specify the pkgconfig configuration file location]) |
308 | AC_MSG_WARN([Finding libuuid without pkg-config.]) | |
309 | AC_CHECK_LIB([uuid], [uuid_generate], | |
310 | [ | |
311 | AC_DEFINE([BABELTRACE_HAVE_LIBUUID], [1]) | |
312 | UUID_LIBS="-luuid" | |
313 | ], | |
314 | [ | |
315 | # libuuid not found, check for uuid_create in libc. | |
316 | AC_CHECK_LIB([c], [uuid_create], | |
317 | [ | |
318 | AC_DEFINE([BABELTRACE_HAVE_LIBUUID], [1]) | |
319 | UUID_LIBS="-lc" | |
320 | ], | |
321 | [ | |
322 | # for MinGW32 we have our own internal implementation of uuid using Windows functions. | |
9ffc0257 MJ |
323 | AS_IF([test "x$MINGW32" = xno], |
324 | [AC_MSG_FAILURE([Cannot find libuuid uuid_generate nor libc uuid_create. Either set PKG_CONFIG_PATH to the configuration file location or use LDFLAGS=-Ldir to specify the library location])] | |
325 | ) | |
60725cf9 MJ |
326 | ] |
327 | ) | |
328 | ] | |
329 | ) | |
330 | ] | |
331 | ) | |
332 | ] | |
333 | ) | |
334 | AC_SUBST(UUID_LIBS) | |
fd55fc57 | 335 | |
f8370579 MD |
336 | # Check for fmemopen |
337 | AC_CHECK_LIB([c], [fmemopen], | |
9ffc0257 | 338 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FMEMOPEN], 1, [Has fmemopen support.])] |
f8370579 MD |
339 | ) |
340 | ||
341 | # Check for open_memstream | |
342 | AC_CHECK_LIB([c], [open_memstream], | |
9ffc0257 | 343 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_OPEN_MEMSTREAM], 1, [Has open_memstream support.])] |
f8370579 MD |
344 | ) |
345 | ||
a323afb2 JG |
346 | # Check for posix_fallocate |
347 | AC_CHECK_LIB([c], [posix_fallocate], | |
9ffc0257 | 348 | [AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_POSIX_FALLOCATE], 1, [Has posix_fallocate support.])] |
a323afb2 JG |
349 | ) |
350 | ||
4817cd5b MJ |
351 | # Check libpopt |
352 | PKG_CHECK_MODULES([POPT], [popt], | |
353 | [ | |
354 | dnl PKG_CHECK_MODULES defines POPT_LIBS | |
355 | ], | |
356 | [ | |
357 | AC_MSG_WARN([pkg-config was unable to find a valid .pc for libpopt. Set PKG_CONFIG_PATH to specify the pkgconfig configuration file location]) | |
358 | AC_MSG_WARN([Finding libpopt without pkg-config.]) | |
359 | AC_CHECK_LIB([popt], | |
360 | [poptGetContext], | |
361 | [POPT_LIBS="-lpopt"], | |
362 | [ | |
363 | AC_MSG_FAILURE([Cannot find libpopt. Either set PKG_CONFIG_PATH to the configuration file location or use LDFLAGS=-Ldir to specify the library location]) | |
364 | ] | |
365 | ) | |
366 | ] | |
0f536a74 | 367 | ) |
4817cd5b | 368 | AC_SUBST(POPT_LIBS) |
0f536a74 | 369 | |
9ffc0257 MJ |
370 | |
371 | ## ## | |
372 | ## User variables ## | |
373 | ## ## | |
374 | ||
375 | AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for Python, bypassing python-config]) | |
376 | AC_ARG_VAR([PYTHON_LIBS], [Library flags for Python, bypassing python-config]) | |
377 | AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) | |
378 | ||
379 | # PLUGINSDIR: Plugins directory | |
a094f13b PP |
380 | AC_ARG_VAR([PLUGINSDIR], [built-in plugins install directory [LIBDIR/babeltrace/plugins]]) |
381 | AS_IF([test "x$PLUGINSDIR" = x], [PLUGINSDIR='$(libdir)/babeltrace/plugins']) | |
382 | ||
9ffc0257 MJ |
383 | # BABELTRACE_MINIMAL_LOG_LEVEL: |
384 | AC_ARG_VAR([BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level for Babeltrace program, library, and plugins (VERBOSE, DEBUG, INFO, WARN, ERROR (default), FATAL, or NONE)]) | |
385 | AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = x], [BABELTRACE_MINIMAL_LOG_LEVEL="VERBOSE"]) | |
386 | AS_IF([test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "VERBOSE" && \ | |
387 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "DEBUG" && \ | |
388 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "INFO" && \ | |
389 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "WARN" && \ | |
390 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "ERROR" && \ | |
391 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "FATAL" && \ | |
392 | test "$BABELTRACE_MINIMAL_LOG_LEVEL" != "NONE"], | |
393 | [AC_MSG_ERROR([Invalid BABELTRACE_MINIMAL_LOG_LEVEL value ($BABELTRACE_MINIMAL_LOG_LEVEL): use VERBOSE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE.])] | |
394 | ) | |
395 | AC_DEFINE_UNQUOTED([BT_LOG_LEVEL], [BT_LOG_$BABELTRACE_MINIMAL_LOG_LEVEL], [Minimal log level]) | |
396 | ||
464ebc31 PP |
397 | # BABELTRACE_DEV_MODE: |
398 | AC_ARG_VAR([BABELTRACE_DEV_MODE], [Set to 1 to enable the Babeltrace developer mode (enables run-time checks for plugin developers)]) | |
399 | AS_IF([test "x$BABELTRACE_DEV_MODE" = x1], [ | |
400 | AS_IF([test "x$BABELTRACE_MINIMAL_LOG_LEVEL" = "xNONE"], [ | |
401 | AC_MSG_ERROR([Babeltrace developer mode (\$BABELTRACE_DEV_MODE) needs \$BABELTRACE_MINIMAL_LOG_LEVEL to be at least FATAL.]) | |
402 | ]) | |
403 | AC_DEFINE([BT_DEV_MODE], 1, [Babeltrace developer mode]) | |
404 | ], [BABELTRACE_DEV_MODE=0]) | |
405 | ||
406 | # BABELTRACE_DEBUG_MODE: | |
407 | AC_ARG_VAR([BABELTRACE_DEBUG_MODE], [Set to 1 to enable the Babeltrace debug mode (enables internal assertions for Babeltrace maintainers)]) | |
408 | AS_IF([test "x$BABELTRACE_DEBUG_MODE" = x1], [ | |
409 | AC_DEFINE([BT_DEBUG_MODE], 1, [Babeltrace debug mode]) | |
410 | ], [BABELTRACE_DEBUG_MODE=0]) | |
411 | ||
9ffc0257 MJ |
412 | |
413 | ## ## | |
414 | ## Optionnal features selection ## | |
415 | ## ## | |
24a3136a | 416 | |
9ffc0257 MJ |
417 | # Python bindings |
418 | # Disabled by default | |
94a6cea3 | 419 | AC_ARG_ENABLE([python-bindings], |
9ffc0257 MJ |
420 | [AC_HELP_STRING([--enable-python-bindings], [build the Python bindings])], |
421 | [], dnl AC_ARG_ENABLE will fill enable_python_bindings with the user choice | |
422 | [enable_python_bindings=no] | |
423 | ) | |
424 | ||
425 | # Python bindings documentation | |
426 | # Disabled by default | |
427 | AC_ARG_ENABLE([python-bindings-doc], | |
428 | [AC_HELP_STRING([--enable-python-bindings-doc], [build the Python bindings documentation])], | |
429 | [], dnl AC_ARG_ENABLE will fill enable_python_bindings_doc with the user choice | |
430 | [enable_python_bindings_doc=no] | |
431 | ) | |
432 | ||
9ffc0257 MJ |
433 | # Python plugins |
434 | # Disabled by default | |
435 | AC_ARG_ENABLE([python-plugins], | |
436 | [AC_HELP_STRING([--enable-python-plugins], [enable the Python plugins support for the library and converter])], | |
437 | [], dnl AC_ARG_ENABLE will fill enable_python_plugins with the user choice | |
438 | [enable_python_plugins=no] | |
439 | ) | |
440 | ||
441 | # Debug info | |
442 | # Enabled by default, except on some platforms | |
443 | AC_ARG_ENABLE([debug-info], | |
444 | [AC_HELP_STRING([--disable-debug-info], [disable the debug info support (default on macOS, Solaris and Windows)])], | |
445 | [], dnl AC_ARG_ENABLE will fill enable_debug_info with the user choice | |
446 | [enable_debug_info="$DEFAULT_ENABLE_DEBUG_INFO"] | |
447 | ) | |
448 | ||
449 | # API documentation | |
450 | # Disabled by default | |
451 | AC_ARG_ENABLE([api-doc], | |
452 | [AC_HELP_STRING([--enable-api-doc], [build the HTML API documentation])], | |
453 | [enable_api_doc=$enableval], | |
454 | [enable_api_doc=no] | |
455 | ) | |
456 | ||
457 | # Built-in plugins | |
458 | # Disabled by default | |
459 | AC_ARG_ENABLE([built-in-plugins], | |
460 | [AC_HELP_STRING([--enable-built-in-plugins], [Statically-link in-tree plug-ins into the babeltrace binary])], | |
461 | [], dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice | |
462 | [enable_built_in_plugins=no] | |
463 | ) | |
464 | ||
465 | # Built-in python plugin support | |
466 | # Disabled by default | |
467 | AC_ARG_ENABLE([built-in-python-plugin-support], | |
468 | [AC_HELP_STRING([--enable-built-in-python-plugin-support], [Statically-link Python plugin support into the babeltrace library])], | |
469 | [], dnl AC_ARG_ENABLE will fill enable_built_in_python_plugin_support with the user choice | |
470 | [enable_built_in_python_plugin_support=no] | |
471 | ) | |
472 | ||
0659f3af PP |
473 | # Man pages |
474 | # Enabled by default | |
475 | AC_ARG_ENABLE([man-pages], | |
476 | [AS_HELP_STRING([--disable-man-pages], [Do not build and install man pages (already built in a distributed tarball])], | |
477 | [], dnl AC_ARG_ENABLE will fill enable_built_in_plugins with the user choice | |
478 | [enable_man_pages=yes] | |
479 | ) | |
480 | ||
9ffc0257 MJ |
481 | |
482 | # Set automake variables for optionnal feature conditionnals in Makefile.am | |
483 | AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS], [test "x$enable_python_bindings" = xyes]) | |
484 | AM_CONDITIONAL([ENABLE_PYTHON_BINDINGS_DOC], [test "x$enable_python_bindings_doc" = xyes]) | |
9ffc0257 MJ |
485 | AM_CONDITIONAL([ENABLE_PYTHON_PLUGINS], [test "x$enable_python_plugins" = xyes]) |
486 | AM_CONDITIONAL([ENABLE_DEBUG_INFO], [test "x$enable_debug_info" = xyes]) | |
487 | AM_CONDITIONAL([ENABLE_API_DOC], [test "x$enable_api_doc" = xyes]) | |
488 | AM_CONDITIONAL([ENABLE_BUILT_IN_PLUGINS], [test "x$enable_built_in_plugins" = xyes]) | |
489 | AM_CONDITIONAL([ENABLE_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [test "x$enable_built_in_python_plugin_support" = xyes]) | |
0659f3af | 490 | AM_CONDITIONAL([ENABLE_MAN_PAGES], [test "x$enable_man_pages" = xyes]) |
9ffc0257 MJ |
491 | |
492 | ||
493 | # Set defines for optionnal features conditionnals in the source code | |
494 | ||
495 | ## jgalar: still used? | |
496 | AS_IF([test "x$enable_python_plugins" = xyes], | |
497 | [AC_DEFINE([PYTHON_PLUGINS], [1], [Python plugin support.])] | |
498 | ) | |
499 | ||
500 | AS_IF([test "x$enable_debug_info" = xyes], | |
501 | [AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature])] | |
502 | ) | |
503 | ||
504 | AS_IF([test "x$enable_built_in_plugins" = xyes], | |
505 | [AC_DEFINE([BT_BUILT_IN_PLUGINS], [1], [Define to 1 to register plug-in attributes in static executable sections])] | |
506 | ) | |
507 | ||
508 | AS_IF([test "x$enable_built_in_python_plugin_support" = xyes], | |
509 | [AC_DEFINE([BT_BUILT_IN_PYTHON_PLUGIN_SUPPORT], [1], [Define to 1 to register plug-in attributes in static executable sections])] | |
510 | ) | |
511 | ||
0659f3af PP |
512 | AS_IF([test "x$enable_debug_info" = xyes], |
513 | [ENABLE_DEBUG_INFO_VAL=1], | |
514 | [ENABLE_DEBUG_INFO_VAL=0] | |
515 | ) | |
516 | ||
517 | AC_SUBST([ENABLE_DEBUG_INFO_VAL]) | |
518 | ||
9ffc0257 | 519 | |
811644b8 | 520 | # Check for conflicting optional features user choices |
9ffc0257 MJ |
521 | |
522 | AS_IF([test "x$enable_python_bindings" = xno], | |
523 | [ | |
524 | AS_IF([test "x$enable_python_bindings_doc" = xyes], [AC_MSG_ERROR([--enable-python-bindings-doc was specified without --enable-python-bindings])]) | |
9ffc0257 MJ |
525 | ] |
526 | ) | |
527 | ||
528 | AS_IF([test "x$enable_built_in_plugins" = xyes], | |
529 | [ | |
530 | # Built-in plug-ins are only available when the --disable-shared --enable-static options are used. | |
531 | AS_IF([test "x$enable_static" != xyes], [AC_MSG_ERROR(--enable-static must be used to bundle plug-ins in the babeltrace executable)]) | |
532 | AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle plug-ins in the babeltrace executable)]) | |
533 | ] | |
534 | ) | |
535 | ||
536 | AS_IF([test "x$enable_built_in_python_plugin_support" = xyes], | |
537 | [ | |
538 | AS_IF([test "x$enable_python_plugins" = xno], [AC_MSG_ERROR([--enable-python-plugins must be used to bundle Python plugin support in the babeltrace executable])]) | |
539 | # Built-in plug-ins are only available when the --disable-shared --enable-static options are used. | |
540 | AS_IF([test "x$enable_static" != xyes], [AC_MSG_ERROR(--enable-static must be used to bundle Python plugin support in the babeltrace executable)]) | |
541 | AS_IF([test "x$enable_shared" = xyes], [AC_MSG_ERROR(--disable-shared must be used to bundle Python plugin support in the babeltrace executable)]) | |
542 | ] | |
55bb57e0 | 543 | ) |
9cf643d1 | 544 | |
4f5f37d9 | 545 | |
9ffc0257 MJ |
546 | # Check for optionnal features dependencies |
547 | ||
548 | AS_IF([test "x$enable_python_bindings" = xyes], | |
549 | [AX_PKG_SWIG(2.0.0, [], [AC_MSG_ERROR([SWIG 2.0.0 or newer is required to build the python bindings])])] | |
550 | ) | |
551 | ||
552 | AS_IF([test "x$enable_python_bindings" = xyes || test "x$enable_python_plugins" = xyes], | |
553 | [ | |
554 | 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 | 555 | |
1b39e2de JG |
556 | AM_PATH_PYTHON_MODULES([PYTHON]) |
557 | # pythondir is the path where extra modules are to be installed | |
558 | pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH | |
559 | # pyexecdir is the path that contains shared objects used by the extra modules | |
560 | pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH | |
24a3136a DS |
561 | AS_IF([test -z "$PYTHON_INCLUDE"], [ |
562 | AS_IF([test -z "$PYTHON_CONFIG"], [ | |
563 | AC_PATH_PROGS([PYTHON_CONFIG], | |
564 | [python$PYTHON_VERSION-config python-config], | |
565 | [no], | |
566 | [`dirname $PYTHON`]) | |
9ffc0257 | 567 | AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Is python-dev installed?])]) |
24a3136a | 568 | ]) |
55bb57e0 | 569 | AC_MSG_CHECKING([Python include flags]) |
24a3136a DS |
570 | PYTHON_INCLUDE=`$PYTHON_CONFIG --includes` |
571 | AC_MSG_RESULT([$PYTHON_INCLUDE]) | |
572 | ]) | |
55bb57e0 PP |
573 | AS_IF([test -z "$PYTHON_LIBS"], [ |
574 | AS_IF([test -z "$PYTHON_CONFIG"], [ | |
575 | AC_PATH_PROGS([PYTHON_CONFIG], | |
576 | [python$PYTHON_VERSION-config python-config], | |
577 | [no], | |
578 | [`dirname $PYTHON`]) | |
9ffc0257 | 579 | AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Is python-dev installed?])]) |
55bb57e0 PP |
580 | ]) |
581 | AC_MSG_CHECKING([Python library flags]) | |
582 | PYTHON_LIBS=`$PYTHON_CONFIG --libs` | |
583 | AC_MSG_RESULT([$PYTHON_LIBS]) | |
584 | ]) | |
9ffc0257 | 585 | ] |
55bb57e0 PP |
586 | ) |
587 | ||
9ffc0257 MJ |
588 | AS_IF([test "x$enable_python_bindings_doc" = xyes], |
589 | [ | |
17137804 PP |
590 | AM_CHECK_PYTHON_SPHINX([PYTHON]) |
591 | AS_IF([test "x$PYTHON_SPHINX_EXISTS" = xno], | |
9ffc0257 | 592 | [AC_MSG_ERROR([The Sphinx package for Python 3 is required to build the Python bindings documentation])] |
4f5f37d9 | 593 | ) |
9ffc0257 MJ |
594 | ] |
595 | ) | |
4f5f37d9 | 596 | |
9ffc0257 MJ |
597 | AS_IF([test "x$enable_debug_info" = xyes], |
598 | [ | |
599 | # Check if libelf and libdw are present | |
901e5c12 MJ |
600 | 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.)]) |
601 | 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.)]) | |
9ffc0257 | 602 | 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.)]) |
901e5c12 | 603 | ELFUTILS_LIBS="-lelf -ldw" |
9ffc0257 MJ |
604 | ] |
605 | ) | |
901e5c12 | 606 | AC_SUBST([ELFUTILS_LIBS]) |
6fbd4105 | 607 | |
9ffc0257 MJ |
608 | AS_IF([test "x$enable_api_doc" = "xyes"], |
609 | [ | |
610 | DX_DOXYGEN_FEATURE(ON) | |
611 | DX_DOT_FEATURE(OFF) | |
612 | DX_HTML_FEATURE(ON) | |
613 | DX_CHM_FEATURE(OFF) | |
614 | DX_CHI_FEATURE(OFF) | |
615 | DX_MAN_FEATURE(OFF) | |
616 | DX_RTF_FEATURE(OFF) | |
617 | DX_XML_FEATURE(OFF) | |
618 | DX_PDF_FEATURE(OFF) | |
619 | DX_PS_FEATURE(OFF) | |
620 | DX_INIT_DOXYGEN([Babeltrace], [$(srcdir)/Doxyfile], [output]) | |
621 | AS_IF([test -z "$DX_DOXYGEN"], | |
622 | [AC_MSG_ERROR([You need doxygen to enable the API documentation])] | |
623 | ) | |
624 | ] | |
625 | ) | |
ac65e355 | 626 | |
0659f3af PP |
627 | have_asciidoc_xmlto=no |
628 | warn_prebuilt_man_pages=no | |
629 | ||
630 | AS_IF([test "x$enable_man_pages" = "xyes"], [ | |
631 | AC_PATH_PROG([ASCIIDOC], [asciidoc], [no]) | |
632 | AC_PATH_PROG([XMLTO], [xmlto], [no]) | |
633 | ||
634 | AS_IF([test "x$ASCIIDOC" = "xno" || test "x$XMLTO" = "xno"], [ | |
635 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
636 | # this is an error because we're in the Git repo, which | |
637 | # means the man pages are not already generated for us, | |
638 | # thus asciixmlto are required because we were asked | |
639 | # to build the man pages | |
640 | AC_MSG_ERROR([ | |
641 | You need asciidoc and xmlto to build the Babeltrace man pages. Use | |
642 | --disable-man-pages to disable building the man pages, in which case | |
643 | they will not be installed. | |
644 | ]) | |
645 | ], [ | |
646 | # only warn here: since we're in the tarball, the man | |
647 | # pages should already be generated at this point, thus | |
648 | # asciidoc/xmlto are not strictly required | |
649 | warn_prebuilt_man_pages=yes | |
650 | ]) | |
651 | ], [ | |
652 | have_asciidoc_xmlto=yes | |
653 | ]) | |
654 | ]) | |
655 | ||
656 | # export AsciiDoc and xmlto existence | |
657 | AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"]) | |
658 | ||
659 | # a wonderful hack that seems necessary because $libdir is | |
660 | # literally `${exec_prefix}/lib`, and $exec_prefix is set to `NONE` | |
661 | # by autoconf when it's not specified by the user | |
662 | AS_IF([test "x$exec_prefix" = xNONE], [ | |
663 | AS_IF([test "x$prefix" = xNONE], [ | |
664 | PREFIX="$ac_default_prefix" | |
665 | ], [ | |
666 | PREFIX="$prefix" | |
667 | ]) | |
668 | ||
669 | LIBDIR="$PREFIX/lib" | |
670 | ], [ | |
671 | LIBDIR="$libdir" | |
672 | ]) | |
673 | ||
674 | AC_SUBST(LIBDIR) | |
675 | ||
beb0fb75 | 676 | |
9ffc0257 | 677 | # Set global CFLAGS in AM_CFLAGS |
f9ddd099 | 678 | AM_CFLAGS="-Wall -Wformat -Werror=implicit-function-declaration $PTHREAD_CFLAGS $GLIB_CFLAGS" |
05c03100 | 679 | AC_SUBST(AM_CFLAGS) |
ac65e355 | 680 | |
9ffc0257 | 681 | # Set global CPPFLAGS in AM_CPPFLAGS |
05c03100 MJ |
682 | AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -include config.h" |
683 | AC_SUBST(AM_CPPFLAGS) | |
684 | ||
9ffc0257 | 685 | # Add glib to global link libs |
582e61bb | 686 | LIBS="$LIBS $GLIB_LIBS" |
38424656 | 687 | |
5b5959d4 MJ |
688 | # Check that the current size_t matches the size that glib thinks it should |
689 | # be. This catches problems on multi-arch where people try to do a 32-bit | |
690 | # build while pointing at 64-bit glib headers. This is a common error because | |
691 | # glib.h is not platform specific but it includes glibconfig.h which is and | |
692 | # is usually installed in a non-standard path. | |
693 | ||
3d130ada MJ |
694 | # Older versions of the pkg-config macros disallows PKG_* in the autoconf |
695 | # output. Specifically allow pkg_config_libdir to be able to print the | |
696 | # error message. | |
697 | m4_pattern_allow([PKG_CONFIG_LIBDIR]) | |
698 | ||
5b5959d4 MJ |
699 | save_CFLAGS=${CFLAGS} |
700 | CFLAGS="${CFLAGS} ${AM_CFLAGS}" | |
701 | AC_COMPILE_IFELSE([ | |
702 | AC_LANG_PROGRAM([dnl | |
703 | #include <glib.h> | |
704 | #include <unistd.h> | |
705 | ], [dnl | |
706 | G_STATIC_ASSERT(sizeof(size_t) == GLIB_SIZEOF_SIZE_T); | |
707 | ]) | |
708 | ],[:],[ | |
709 | AC_MSG_ERROR([dnl | |
710 | sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set | |
711 | PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build | |
712 | target. | |
713 | ]) | |
714 | ]) | |
715 | CFLAGS=${save_CFLAGS} | |
716 | ||
9ffc0257 MJ |
717 | # Abuse autoconf's AC_ARG_PROGRAM output variable 'program_transform_name' |
718 | # to rename babeltrace.bin to babeltrace at install time. | |
899a1d74 | 719 | program_transform_name="s&babeltrace\.bin&babeltrace&;s&babeltrace-log\.bin&babeltrace-log&;$program_transform_name" |
33b34c43 | 720 | AC_SUBST(program_transform_name) |
591999ca | 721 | |
ac65e355 MD |
722 | AC_CONFIG_FILES([ |
723 | Makefile | |
811644b8 PP |
724 | bindings/python/Makefile |
725 | bindings/python/bt2/Makefile | |
1b8fb862 MJ |
726 | bindings/python/bt2/setup.py |
727 | bindings/python/bt2/bt2/__init__.py | |
1670bffd | 728 | common/Makefile |
013f35c6 | 729 | ctfser/Makefile |
9d1e7de0 | 730 | compat/Makefile |
8d77550c | 731 | cli/Makefile |
d2c0553c | 732 | doc/Makefile |
dc3fffef PP |
733 | doc/api/Makefile |
734 | doc/api/Doxyfile | |
4f5f37d9 PP |
735 | doc/bindings/Makefile |
736 | doc/bindings/python/Makefile | |
f9ded0e0 | 737 | doc/contributing-images/Makefile |
0659f3af PP |
738 | doc/man/Makefile |
739 | doc/man/asciidoc-attrs.conf | |
1e638f98 | 740 | fd-cache/Makefile |
1eb0c69c | 741 | lib/Makefile |
74f21e2d | 742 | lib/prio_heap/Makefile |
33b34c43 | 743 | lib/plugin/Makefile |
c5504f73 | 744 | lib/graph/Makefile |
d6e69534 | 745 | lib/graph/message/Makefile |
56e18c4c | 746 | lib/trace-ir/Makefile |
dc3fffef | 747 | lib/ctf-writer/Makefile |
e92927d1 | 748 | include/Makefile |
beb0fb75 | 749 | logging/Makefile |
24a3136a | 750 | bindings/Makefile |
ac65e355 | 751 | tests/Makefile |
a8101b91 PP |
752 | tests/cli/Makefile |
753 | tests/cli/intersection/Makefile | |
aa968dde | 754 | tests/lib/Makefile |
cbb9e0b1 | 755 | tests/lib/test-plugin-plugins/Makefile |
56e18c4c | 756 | tests/lib/trace-ir/Makefile |
d461e009 | 757 | tests/lib/ctf-writer/Makefile |
03f007c8 | 758 | tests/utils/common.sh |
1833a3d1 CB |
759 | tests/utils/Makefile |
760 | tests/utils/tap/Makefile | |
9cf643d1 PP |
761 | tests/bindings/Makefile |
762 | tests/bindings/python/Makefile | |
763 | tests/bindings/python/bt2/Makefile | |
8deeabc6 | 764 | tests/plugins/Makefile |
d907165c | 765 | tests/plugins/ctf/Makefile |
4965530a | 766 | tests/python-plugin-provider/Makefile |
6aa249b5 MD |
767 | extras/Makefile |
768 | extras/valgrind/Makefile | |
8ca04164 | 769 | plugins/Makefile |
38d02a17 | 770 | plugins/ctf/Makefile |
06a626b8 | 771 | plugins/ctf/common/Makefile |
5cd6d0e5 | 772 | plugins/ctf/common/bfcr/Makefile |
06a626b8 | 773 | plugins/ctf/common/metadata/Makefile |
d6e69534 | 774 | plugins/ctf/common/msg-iter/Makefile |
a429c321 | 775 | plugins/ctf/common/utils/Makefile |
d8866baa PP |
776 | plugins/ctf/fs-src/Makefile |
777 | plugins/ctf/fs-sink/Makefile | |
f3bc2010 JG |
778 | plugins/ctf/lttng-live/Makefile |
779 | plugins/text/Makefile | |
9ffc0257 | 780 | plugins/text/dmesg/Makefile |
3228cc1d | 781 | plugins/text/pretty/Makefile |
e0dfa761 PP |
782 | plugins/utils/Makefile |
783 | plugins/utils/dummy/Makefile | |
358340ec | 784 | plugins/utils/counter/Makefile |
e0dfa761 | 785 | plugins/utils/trimmer/Makefile |
958f7d11 | 786 | plugins/utils/muxer/Makefile |
6fbd4105 | 787 | python-plugin-provider/Makefile |
456a4476 | 788 | plugins/lttng-utils/Makefile |
c283522b | 789 | plugins/lttng-utils/debug-info/Makefile |
d0acc96d | 790 | babeltrace.pc |
e7a7efdb | 791 | babeltrace-ctf.pc |
ac65e355 | 792 | ]) |
c41a7502 | 793 | |
a8101b91 | 794 | AC_CONFIG_FILES([tests/cli/intersection/test_intersection], [chmod +x tests/cli/intersection/test_intersection]) |
73d7fabb | 795 | AC_CONFIG_FILES([tests/cli/test_convert_args], [chmod +x tests/cli/test_convert_args]) |
b4c499ed | 796 | AC_CONFIG_FILES([tests/cli/test_output_ctf_metadata], [chmod +x tests/cli/test_output_ctf_metadata]) |
9ffc0257 MJ |
797 | AC_CONFIG_FILES([tests/cli/test_packet_seq_num], [chmod +x tests/cli/test_packet_seq_num]) |
798 | AC_CONFIG_FILES([tests/cli/test_trace_copy], [chmod +x tests/cli/test_trace_copy]) | |
799 | AC_CONFIG_FILES([tests/cli/test_trace_read], [chmod +x tests/cli/test_trace_read]) | |
800 | AC_CONFIG_FILES([tests/cli/test_trimmer], [chmod +x tests/cli/test_trimmer]) | |
9ffc0257 | 801 | AC_CONFIG_FILES([tests/lib/test_ctf_writer_complete], [chmod +x tests/lib/test_ctf_writer_complete]) |
9ffc0257 | 802 | AC_CONFIG_FILES([tests/lib/test_plugin_complete], [chmod +x tests/lib/test_plugin_complete]) |
56e18c4c | 803 | AC_CONFIG_FILES([tests/lib/trace-ir/test_trace_ir], [chmod +x tests/lib/trace-ir/test_trace_ir]) |
d461e009 | 804 | AC_CONFIG_FILES([tests/lib/ctf-writer/test_ctf_writer], [chmod +x tests/lib/ctf-writer/test_ctf_writer]) |
d907165c | 805 | AC_CONFIG_FILES([tests/plugins/ctf/test_ctf_plugin], [chmod +x tests/plugins/ctf/test_ctf_plugin]) |
f651e984 | 806 | AC_CONFIG_FILES([tests/plugins/test_utils_muxer_complete], [chmod +x tests/plugins/test_utils_muxer_complete]) |
d8992d68 | 807 | AC_CONFIG_FILES([tests/plugins/test_lttng_utils_debug_info], [chmod +x tests/plugins/test_lttng_utils_debug_info]) |
48c91dde | 808 | AC_CONFIG_FILES([tests/plugins/test_dwarf_i386-linux-gnu], [chmod +x tests/plugins/test_dwarf_i386-linux-gnu]) |
5d30f567 | 809 | AC_CONFIG_FILES([tests/plugins/test_dwarf_powerpc-linux-gnu], [chmod +x tests/plugins/test_dwarf_powerpc-linux-gnu]) |
6a284733 | 810 | AC_CONFIG_FILES([tests/plugins/test_dwarf_x86_64-linux-gnu], [chmod +x tests/plugins/test_dwarf_x86_64-linux-gnu]) |
48c91dde | 811 | AC_CONFIG_FILES([tests/plugins/test_bin_info_i386-linux-gnu], [chmod +x tests/plugins/test_bin_info_i386-linux-gnu]) |
5d30f567 | 812 | AC_CONFIG_FILES([tests/plugins/test_bin_info_powerpc-linux-gnu], [chmod +x tests/plugins/test_bin_info_powerpc-linux-gnu]) |
6a284733 | 813 | AC_CONFIG_FILES([tests/plugins/test_bin_info_x86_64-linux-gnu], [chmod +x tests/plugins/test_bin_info_x86_64-linux-gnu]) |
c41a7502 | 814 | |
d85a1248 | 815 | AS_IF([test "x$enable_python_bindings" = xyes], |
b016b06b JG |
816 | [ |
817 | AC_CONFIG_FILES([tests/bindings/python/bt2/test_python_bt2], [chmod +x tests/bindings/python/bt2/test_python_bt2]) | |
d4b704b0 | 818 | AC_CONFIG_FILES([tests/utils/test_python_bt2_env], [chmod +x tests/utils/test_python_bt2_env]) |
b016b06b JG |
819 | AC_CONFIG_FILES([tests/bindings/python/babeltrace/test_python_babeltrace], [chmod +x tests/bindings/python/babeltrace/test_python_babeltrace]) |
820 | ] | |
9ffc0257 | 821 | ) |
9cf643d1 | 822 | |
4965530a | 823 | AS_IF([test "x$enable_python_plugins" = "xyes"], |
66e4fcb5 | 824 | [AC_CONFIG_FILES([tests/python-plugin-provider/test_python_plugin_provider], [chmod +x tests/python-plugin-provider/test_python_plugin_provider])] |
88b3fc9c | 825 | [AC_CONFIG_FILES([tests/python-plugin-provider/test_python_plugin_provider_env], [chmod +x tests/python-plugin-provider/test_python_plugin_provider_env])] |
4965530a PP |
826 | ) |
827 | ||
ac65e355 | 828 | AC_OUTPUT |
1a0399f9 MJ |
829 | |
830 | # | |
831 | # Mini-report on what will be built. | |
832 | # | |
833 | ||
834 | PPRINT_INIT | |
835 | PPRINT_SET_INDENT(1) | |
836 | PPRINT_SET_TS(38) | |
837 | ||
838 | AS_ECHO | |
839 | AS_ECHO("${PPRINT_COLOR_BLDBLU}Babeltrace $PACKAGE_VERSION$PPRINT_COLOR_RST") | |
840 | AS_ECHO | |
841 | ||
4266f2ad | 842 | PPRINT_SUBTITLE([System]) |
1a0399f9 MJ |
843 | |
844 | # Target architecture we're building for. | |
845 | target_arch=$host_cpu | |
846 | [ | |
847 | for f in $CFLAGS; do | |
848 | if test $f = "-m32"; then | |
849 | target_arch="32-bit" | |
850 | elif test $f = "-m64"; then | |
851 | target_arch="64-bit" | |
852 | fi | |
853 | done | |
854 | ] | |
beb0fb75 | 855 | |
4266f2ad | 856 | PPRINT_PROP_STRING([Target architecture], $target_arch) |
d1dab1d2 | 857 | |
4266f2ad PP |
858 | AS_ECHO |
859 | PPRINT_SUBTITLE([Python 3 language support]) | |
55bb57e0 | 860 | test "x$enable_python_bindings" = "xyes" && value=1 || value=0 |
1a0399f9 | 861 | PPRINT_PROP_BOOL([Python bindings], $value) |
55bb57e0 PP |
862 | test "x$enable_python_plugins" = "xyes" && value=1 || value=0 |
863 | PPRINT_PROP_BOOL([Python plugin support], $value) | |
4266f2ad PP |
864 | AS_IF([test "x$enable_python_bindings" = "xyes" || test "x$enable_python_plugins" = "xyes"], [ |
865 | PPRINT_PROP_STRING([Python include paths], [$PYTHON_INCLUDE]) | |
866 | PPRINT_PROP_STRING([Python libraries], [$PYTHON_LIBS]) | |
867 | ]) | |
55bb57e0 | 868 | |
4266f2ad PP |
869 | AS_ECHO |
870 | PPRINT_SUBTITLE([Plugins]) | |
871 | PPRINT_PROP_BOOL(['ctf' plugin], 1) | |
9ffc0257 | 872 | test "x$enable_debug_info" = "xyes" && value=1 || value=0 |
4266f2ad PP |
873 | PPRINT_PROP_BOOL(['lttng-utils' plugin], $value) |
874 | PPRINT_PROP_BOOL(['text' plugin], 1) | |
875 | PPRINT_PROP_BOOL(['utils' plugin], 1) | |
876 | ||
877 | AS_ECHO | |
878 | PPRINT_SUBTITLE([Built-in features]) | |
9ffc0257 | 879 | test "x$enable_built_in_plugins" = "xyes" && value=1 || value=0 |
4266f2ad | 880 | PPRINT_PROP_BOOL([Built-in plugins], $value) |
9ffc0257 | 881 | test "x$enable_built_in_python_plugin_support" = "xyes" && value=1 || value=0 |
6fbd4105 PP |
882 | PPRINT_PROP_BOOL([Built-in Python plugin support], $value) |
883 | ||
4266f2ad PP |
884 | AS_ECHO |
885 | PPRINT_SUBTITLE([Documentation]) | |
0659f3af PP |
886 | |
887 | # man pages build enabled/disabled | |
888 | m4_pushdef([build_man_pages_msg], [Build and install man pages]) | |
889 | ||
890 | AS_IF([test "x$enable_man_pages" != "xno"], [ | |
891 | AS_IF([test "x$in_git_repo" = "xyes"], [ | |
892 | PPRINT_PROP_BOOL([build_man_pages_msg], 1) | |
893 | ], [ | |
894 | AS_IF([test "x$have_asciidoc_xmlto" = "xyes"], [ | |
895 | PPRINT_PROP_BOOL([build_man_pages_msg], 1) | |
896 | ], [ | |
897 | PPRINT_PROP_STRING([build_man_pages_msg], | |
898 | [${PPRINT_COLOR_BLDGRN}yes (already built)], | |
899 | $PPRINT_COLOR_SUBTITLE) | |
900 | ]) | |
901 | ]) | |
902 | ], [ | |
903 | PPRINT_PROP_BOOL([build_man_pages_msg], 0) | |
904 | ]) | |
905 | ||
906 | m4_popdef([build_man_pages_msg]) | |
907 | ||
4266f2ad PP |
908 | test "x$enable_api_doc" = "xyes" && value=1 || value=0 |
909 | PPRINT_PROP_BOOL([HTML API documentation], $value) | |
910 | test "x$enable_python_bindings_doc" = "xyes" && value=1 || value=0 | |
911 | PPRINT_PROP_BOOL([Python bindings documentation], $value) | |
1a0399f9 | 912 | |
4266f2ad PP |
913 | AS_ECHO |
914 | PPRINT_SUBTITLE([Logging]) | |
915 | PPRINT_PROP_STRING([Minimal log level], $BABELTRACE_MINIMAL_LOG_LEVEL) | |
916 | ||
464ebc31 PP |
917 | AS_ECHO |
918 | PPRINT_SUBTITLE([Special build modes]) | |
919 | PPRINT_PROP_BOOL([Debug mode], $BABELTRACE_DEBUG_MODE) | |
920 | PPRINT_PROP_BOOL([Developer mode], $BABELTRACE_DEV_MODE) | |
921 | ||
1a0399f9 MJ |
922 | report_bindir="`eval eval echo $bindir`" |
923 | report_libdir="`eval eval echo $libdir`" | |
4266f2ad | 924 | report_sysconfdif="`eval eval echo $sysconfdir`" |
1a0399f9 MJ |
925 | |
926 | # Print the bindir and libdir this `make install' will install into. | |
927 | AS_ECHO | |
928 | PPRINT_SUBTITLE([Install directories]) | |
929 | PPRINT_PROP_STRING([Binaries], [$report_bindir]) | |
930 | PPRINT_PROP_STRING([Libraries], [$report_libdir]) | |
4266f2ad PP |
931 | PPRINT_PROP_STRING([Plugins], [$report_libdir/babeltrace/plugins]) |
932 | PPRINT_PROP_STRING([Configuration], [$report_sysconfdif]) |