+# Always check for python, we will fail later if some features require it and
+# it's unavailable.
+AM_PATH_PYTHON([3.0], [
+ AE_PATH_PYTHON_MODULES([PYTHON])
+
+ # pythondir is the path where extra modules are to be installed
+ pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH
+
+ # pyexecdir is the path that contains shared objects used by the extra modules
+ pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH
+
+ # If no PYTHON_CONFIG was specified by the user, try to find it, starting
+ # with the one specific to the configured python version.
+ AS_IF([test "x$PYTHON_CONFIG" = "x"], [
+ AC_CHECK_PROGS([PYTHON_CONFIG], [python$PYTHON_VERSION-config python-config])
+ ])
+
+ # If PYTHON_CONFIG is set use it to get the includes and ld flags, unless
+ # they were specified by the user.
+ AS_IF([test "x$PYTHON_CONFIG" != "x" ], [
+ AS_IF([test "x$PYTHON_INCLUDE" = "x"], [
+ AC_MSG_CHECKING([Python include flags])
+ PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
+ AC_MSG_RESULT([$PYTHON_INCLUDE])
+ ])
+
+ AS_IF([test "x$PYTHON_LDFLAGS" = "x"], [
+ AC_MSG_CHECKING([Python library flags])
+ # Python 3.8+ requires that we pass --embed to get the -lpython3.x flag.
+ AS_IF([! PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags --embed`], [
+ PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
+ ])
+ AC_MSG_RESULT([$PYTHON_LDFLAGS])
+ ])
+ ])
+], [:])
+
-# Always check for python, we will fail later if some features require it and
-# it's unavailable.
-AM_PATH_PYTHON([3.0], [
- AE_PATH_PYTHON_MODULES([PYTHON])
-
- # pythondir is the path where extra modules are to be installed
- pythondir=$PYTHON_PREFIX/$PYTHON_MODULES_PATH
-
- # pyexecdir is the path that contains shared objects used by the extra modules
- pyexecdir=$PYTHON_EXEC_PREFIX/$PYTHON_MODULES_PATH
-
- AS_IF([test -z "$PYTHON_CONFIG"], [
- AC_PATH_PROGS([PYTHON_CONFIG],
- [python$PYTHON_VERSION-config python-config],
- [],
- [`dirname $PYTHON`])
- ])
-
- AS_IF([test -n "$PYTHON_CONFIG"], [
- AS_IF([test -z "$PYTHON_INCLUDE"], [
- AC_MSG_CHECKING([Python include flags])
- PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
- AC_MSG_RESULT([$PYTHON_INCLUDE])
- ])
-
- AS_IF([test -z "$PYTHON_LDFLAGS"], [
- AC_MSG_CHECKING([Python library flags])
- # Python 3.8+ requires that we pass --embed to get the -lpython3.x flag.
- AS_IF([! PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags --embed`], [
- PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
- ])
- AC_MSG_RESULT([$PYTHON_LDFLAGS])
- ])
- ])
-], [:])
-
+m4_define([WARN_FLAGS_LIST], [ dnl
+ -Wall dnl
+ -Wextra dnl
+ -Wmissing-prototypes dnl
+ -Wmissing-declarations dnl
+ -Wnull-dereference dnl
+ -Wundef dnl
+ -Wredundant-decls dnl
+ -Wshadow dnl
+ -Wjump-misses-init dnl
+ -Wsuggest-attribute=format dnl
+ -Wtautological-constant-out-of-range-compare dnl
+ -Wnested-externs dnl
+ -Wwrite-strings dnl
+ -Wformat=2 dnl
+ -Wstrict-aliasing dnl
+ -Wmissing-noreturn dnl
+ -Winit-self dnl
+ -Wduplicated-cond dnl
+ -Wduplicated-branches dnl
+ -Wlogical-op dnl
+ -Wno-unused-parameter dnl
+ -Wno-sign-compare dnl
+ dnl
+ dnl Some versions of SWIG (like 3.0.12) generate code that produces
+ dnl -Wcast-function-type warnings. This warning is present in gcc >= 8. This
+ dnl combo happens on RHEL/Centos 8, for example. Later versions of SWIG (like
+ dnl 4.0.1) have the correct function signatures to not produce this warning.
+ dnl It's simpler to just disable the warning globally.
+ dnl
+ dnl Note that the Debian/Ubuntu SWIG package 3.0.12-2 contains a local patch to
+ dnl fix this (python-fix-function-cast-warnings.patch), so you won't be able to
+ dnl reproduce the warning using that package.
+ dnl
+ dnl Ref: https://github.com/swig/swig/issues/1259
+ -Wno-cast-function-type dnl
+ -Wno-missing-field-initializers dnl
+])
+
-AX_APPEND_COMPILE_FLAGS([ dnl
- -Wall dnl
- -Wextra dnl
- -Wmissing-prototypes dnl
- -Wmissing-declarations dnl
- -Wnull-dereference dnl
- -Wundef dnl
- -Wredundant-decls dnl
- -Wshadow dnl
- -Wjump-misses-init dnl
- -Wsuggest-attribute=format dnl
- -Wtautological-constant-out-of-range-compare dnl
- -Wnested-externs dnl
- -Wwrite-strings dnl
- -Wformat=2 dnl
- -Wstrict-aliasing dnl
- -Wmissing-noreturn dnl
- -Winit-self dnl
- -Wduplicated-cond dnl
- -Wduplicated-branches dnl
- -Wlogical-op dnl
- -Wno-unused-parameter dnl
- -Wno-sign-compare dnl
- dnl
- dnl Some versions of SWIG (like 3.0.12) generate code that produces
- dnl -Wcast-function-type warnings. This warning is present in gcc >= 8. This
- dnl combo happens on RHEL/Centos 8, for example. Later versions of SWIG (like
- dnl 4.0.1) have the correct function signatures to not produce this warning.
- dnl It's simpler to just disable the warning globally.
- dnl
- dnl Note that the Debian/Ubuntu SWIG package 3.0.12-2 contains a local patch to
- dnl fix this (python-fix-function-cast-warnings.patch), so you won't be able to
- dnl reproduce the warning using that package.
- dnl
- dnl Ref: https://github.com/swig/swig/issues/1259
- -Wno-cast-function-type dnl
- -Wno-missing-field-initializers dnl
- ],
- [WARN_CFLAGS],
- [-Werror])
+AC_LANG([C++])
+AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CXXFLAGS], [-Werror])
+AC_LANG([C])
+AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
- doc/api/Makefile
- doc/api/libbabeltrace2/Doxyfile
- doc/api/libbabeltrace2/Makefile
- doc/bindings/Makefile
- doc/bindings/python/Makefile
- doc/contributing-images/Makefile
- doc/Makefile
- doc/man/asciidoc-attrs.conf
- doc/man/Makefile
- include/Makefile
- Makefile
- src/argpar/Makefile
- src/autodisc/Makefile
- src/babeltrace2-ctf-writer.pc
- src/babeltrace2.pc
- src/bindings/Makefile
- src/bindings/python/bt2/bt2/version.py
- src/bindings/python/bt2/Makefile
- src/bindings/python/bt2/setup.py
- src/bindings/python/Makefile
- src/cli/Makefile
- src/common/Makefile
- src/compat/Makefile
- src/ctfser/Makefile
- src/ctf-writer/Makefile
- src/fd-cache/Makefile
- src/lib/graph/Makefile
- src/lib/graph/message/Makefile
- src/lib/Makefile
- src/lib/plugin/Makefile
- src/lib/prio-heap/Makefile
- src/lib/trace-ir/Makefile
- src/logging/Makefile
- src/Makefile
- src/plugins/common/Makefile
- src/plugins/common/muxing/Makefile
- src/plugins/common/param-validation/Makefile
- src/plugins/ctf/common/bfcr/Makefile
- src/plugins/ctf/common/Makefile
- src/plugins/ctf/common/metadata/Makefile
- src/plugins/ctf/common/msg-iter/Makefile
- src/plugins/ctf/fs-sink/Makefile
- src/plugins/ctf/fs-src/Makefile
- src/plugins/ctf/lttng-live/Makefile
- src/plugins/ctf/Makefile
- src/plugins/lttng-utils/debug-info/Makefile
- src/plugins/lttng-utils/Makefile
- src/plugins/Makefile
- src/plugins/text/dmesg/Makefile
- src/plugins/text/Makefile
- src/plugins/text/pretty/Makefile
- src/plugins/text/details/Makefile
- src/plugins/utils/counter/Makefile
- src/plugins/utils/dummy/Makefile
- src/plugins/utils/Makefile
- src/plugins/utils/muxer/Makefile
- src/plugins/utils/trimmer/Makefile
- src/py-common/Makefile
- src/python-plugin-provider/Makefile
- src/param-parse/Makefile
- src/string-format/Makefile
- tests/bitfield/Makefile
- tests/ctf-writer/Makefile
- tests/lib/Makefile
- tests/lib/test-plugin-plugins/Makefile
- tests/lib/conds/Makefile
- tests/Makefile
- tests/param-validation/Makefile
- tests/plugins/Makefile
- tests/plugins/src.ctf.fs/Makefile
- tests/plugins/src.ctf.fs/succeed/Makefile
- tests/plugins/sink.ctf.fs/Makefile
- tests/plugins/sink.ctf.fs/succeed/Makefile
- tests/plugins/flt.lttng-utils.debug-info/Makefile
- tests/plugins/flt.utils.muxer/Makefile
- tests/plugins/flt.utils.muxer/succeed/Makefile
- tests/plugins/flt.utils.trimmer/Makefile
- tests/plugins/sink.text.pretty/Makefile
- tests/utils/Makefile
- tests/utils/tap/Makefile
+ doc/api/Makefile
+ doc/api/libbabeltrace2/Doxyfile
+ doc/api/libbabeltrace2/Makefile
+ doc/bindings/Makefile
+ doc/bindings/python/Makefile
+ doc/contributing-images/Makefile
+ doc/Makefile
+ doc/man/asciidoc-attrs.conf
+ doc/man/Makefile
+ include/Makefile
+ Makefile
+ src/argpar/Makefile
+ src/autodisc/Makefile
+ src/babeltrace2-ctf-writer.pc
+ src/babeltrace2.pc
+ src/bindings/Makefile
+ src/bindings/python/bt2/bt2/version.py
+ src/bindings/python/bt2/Makefile
+ src/bindings/python/bt2/setup.py
+ src/bindings/python/Makefile
+ src/cli/Makefile
+ src/common/Makefile
+ src/compat/Makefile
+ src/ctfser/Makefile
+ src/ctf-writer/Makefile
+ src/fd-cache/Makefile
+ src/lib/graph/Makefile
+ src/lib/graph/message/Makefile
+ src/lib/Makefile
+ src/lib/plugin/Makefile
+ src/lib/prio-heap/Makefile
+ src/lib/trace-ir/Makefile
+ src/logging/Makefile
+ src/Makefile
+ src/plugins/common/Makefile
+ src/plugins/common/muxing/Makefile
+ src/plugins/common/param-validation/Makefile
+ src/plugins/ctf/common/bfcr/Makefile
+ src/plugins/ctf/common/Makefile
+ src/plugins/ctf/common/metadata/Makefile
+ src/plugins/ctf/common/msg-iter/Makefile
+ src/plugins/ctf/fs-sink/Makefile
+ src/plugins/ctf/fs-src/Makefile
+ src/plugins/ctf/lttng-live/Makefile
+ src/plugins/ctf/Makefile
+ src/plugins/lttng-utils/debug-info/Makefile
+ src/plugins/lttng-utils/Makefile
+ src/plugins/Makefile
+ src/plugins/text/dmesg/Makefile
+ src/plugins/text/Makefile
+ src/plugins/text/pretty/Makefile
+ src/plugins/text/details/Makefile
+ src/plugins/utils/counter/Makefile
+ src/plugins/utils/dummy/Makefile
+ src/plugins/utils/Makefile
+ src/plugins/utils/muxer/Makefile
+ src/plugins/utils/trimmer/Makefile
+ src/py-common/Makefile
+ src/python-plugin-provider/Makefile
+ src/param-parse/Makefile
+ src/string-format/Makefile
+ tests/bitfield/Makefile
+ tests/ctf-writer/Makefile
+ tests/lib/Makefile
+ tests/lib/test-plugin-plugins/Makefile
+ tests/lib/conds/Makefile
+ tests/Makefile
+ tests/param-validation/Makefile
+ tests/plugins/Makefile
+ tests/plugins/src.ctf.fs/Makefile
+ tests/plugins/src.ctf.fs/succeed/Makefile
+ tests/plugins/sink.ctf.fs/Makefile
+ tests/plugins/sink.ctf.fs/succeed/Makefile
+ tests/plugins/flt.lttng-utils.debug-info/Makefile
+ tests/plugins/flt.utils.muxer/Makefile
+ tests/plugins/flt.utils.muxer/succeed/Makefile
+ tests/plugins/flt.utils.trimmer/Makefile
+ tests/plugins/sink.text.pretty/Makefile
+ tests/utils/Makefile
+ tests/utils/tap/Makefile