AS_IF([test "x$have_python_dev" = xno], [
AC_MSG_ERROR([Cannot find a suitable python-config. You can override the python-config path with the PYTHON_CONFIG environment variable.])
])
+
+ AX_COMPARE_VERSION(["$PYTHON_VERSION"], [ge], ["3.12"], [
+ AC_MSG_CHECKING([for python setuptools])
+ AS_IF(["$PYTHON" -c "import setuptools" 2>/dev/null], [
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python >= 3.12 removed 'distutils', the 'setuptools' module needs to be installed for the selected interpreter.])
+ ])
+ ])
])
AE_IF_FEATURE_ENABLED([python-bindings-doc],
# 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"
])
-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
+ -Wshadow-field 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