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