dnl
dnl Process this file with autoconf to produce a configure script.
-## ##
-## Autoconf base setup ##
-## ##
-
-AC_PREREQ([2.69])
-
+# Project version information
m4_define([bt_version_major], [2])
m4_define([bt_version_minor], [1])
m4_define([bt_version_patch], [0])
m4_define([bt_version_dev_stage], [-rc1])
m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_dev_stage)
-m4_define([bt_version_name], [])
-
-AC_INIT([babeltrace2],[bt_version],[jeremie dot galarneau at efficios dot com],[],[https://efficios.com/babeltrace/])
+m4_define([bt_version_name], [[Codename TBD]])
+m4_define([bt_version_description], [[Description TBD]])
+# Library version information of "libbabeltrace2"
# Following the numbering scheme proposed by libtool for the library version
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
m4_define([bt_lib_version_current], [0])
m4_define([bt_lib_version_revision], [0])
m4_define([bt_lib_version_age], [0])
m4_define([bt_lib_version], bt_lib_version_current[:]bt_lib_version_revision[:]bt_lib_version_age)
-m4_define([bt_version_description], [])
-m4_define([bt_version_description_c_safe], AS_ESCAPE(bt_version_description))
+
+
+## ##
+## Autoconf base setup ##
+## ##
+
+AC_PREREQ([2.69])
+AC_INIT([babeltrace2],[bt_version],[jeremie dot galarneau at efficios dot com],[],[https://efficios.com/babeltrace/])
AC_SUBST([BABELTRACE_LIBRARY_VERSION], bt_lib_version)
AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace patch version])
AC_DEFINE([BT_VERSION_DEV_STAGE], ["]bt_version_dev_stage["], [Babeltrace version development stage (can be empty)])
AC_DEFINE([BT_VERSION_NAME], ["]bt_version_name["], [Babeltrace version name])
-AC_DEFINE([BT_VERSION_DESCRIPTION], ["]bt_version_description_c_safe["], [Babeltrace version description])
+AC_DEFINE([BT_VERSION_DESCRIPTION], ["]AS_ESCAPE(bt_version_description)["], [Babeltrace version description])
AC_CANONICAL_TARGET
AC_CANONICAL_HOST
AC_CHECK_PROGS([ASCIIDOC], [asciidoc])
AC_CHECK_PROGS([XMLTO], [xmlto])
-# set $IN_GIT_REPO if we're in the Git repository; the `bootstrap` file
-# is not distributed in tarballs
-AS_IF([test -f "$srcdir/bootstrap"], [in_git_repo=yes], [in_git_repo=no])
-AM_CONDITIONAL([IN_GIT_REPO], [test "x$in_git_repo" = "xyes"])
-
# check for bison
AC_PROG_YACC
AX_PROG_BISON_VERSION([2.5], [have_bison=yes])
AS_IF([test "x$have_bison" != "xyes"], [
- AS_IF([test "x$in_git_repo" = "xyes"], [
+ AE_IF_IN_GIT_REPO([
AC_MSG_FAILURE([dnl
Bison >= 2.4 is required when building from the Git repository. You can
set the YACC variable to override automatic detection.
AX_PROG_FLEX_VERSION([2.5.35], [have_flex=yes])
AS_IF([test "x$have_flex" != "xyes"], [
- AS_IF([test "x$in_git_repo" = "xyes"], [
+ AE_IF_IN_GIT_REPO([
AC_MSG_FAILURE([dnl
Flex >= 2.5.35 is required when building from the Git repository. You can
set the LEX variable to override automatic detection.
# Turns out SLES12 doesn't bother shipping .pc file for libelf
AC_MSG_WARN([Finding libelf without pkg-config.])
- 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.)])
- 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.)])
+ 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.)])
+ 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.)])
AE_LIB_ELFUTILS([0], [154], [], [AC_MSG_ERROR(elfutils >= 0.154 is required to use the debug info feature. You can disable this feature using --disable-debug-info.)])
ELFUTILS_LIBS="-lelf -ldw"
])
AE_IF_FEATURE_ENABLED([man-pages], [
AS_IF([test "x$ASCIIDOC" = "x" || test "x$XMLTO" = "x"], [
- AS_IF([test "x$in_git_repo" = "xyes"], [
+ AE_IF_IN_GIT_REPO([
# this is an error because we're in the Git repo, which
# means the man pages are not already generated for us,
# thus asciixmlto are required because we were asked
-Wundef dnl
-Wredundant-decls dnl
-Wshadow dnl
+ dnl GCC's -Wshadow warns about constructor parameters shadowing fields, but
+ dnl Clang's does not. Enable Clang's `-Wshadow-field-in-constructor`, to make
+ dnl Clang warn about that.
+ -Wshadow-field-in-constructor dnl
-Wjump-misses-init dnl
-Wsuggest-attribute=format dnl
-Wtautological-constant-out-of-range-compare dnl
-Wduplicated-cond dnl
-Wduplicated-branches dnl
-Wlogical-op dnl
+ -Wsuggest-override dnl
-Wno-unused-parameter dnl
-Wno-sign-compare dnl
dnl
dnl Ref: https://github.com/swig/swig/issues/1259
-Wno-cast-function-type dnl
-Wno-missing-field-initializers dnl
+ -Wno-maybe-uninitialized dnl
])
# Pass -Werror as an extra flag during the test: this is needed to make the
src/bindings/python/Makefile
src/cli/Makefile
src/common/Makefile
+ src/cpp-common/Makefile
src/compat/Makefile
src/ctfser/Makefile
src/ctf-writer/Makefile
# man pages build enabled/disabled
m4_pushdef([build_man_pages_msg], [Build and install man pages])
-AS_IF([test "x$enable_man_pages" != "xno"], [
- AS_IF([test "x$in_git_repo" = "xyes"], [
+AE_IF_FEATURE_ENABLED([man-pages], [
+ AE_IF_IN_GIT_REPO([
PPRINT_PROP_BOOL([build_man_pages_msg], 1)
], [
AS_IF([test "x$have_asciidoc_xmlto" = "xyes"], [