[AC_MSG_WARN([python interpreter not found, do not build python bindings])],
[*:yes],
# check for python development stuff
- [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],
- [have_libpython=yes], [have_libpython=no])]
+ [
+ PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION], [have_libpython=yes], [have_libpython=no])
+
+ # https://github.com/util-linux/util-linux/issues/2366
+ AX_COMPARE_VERSION([$PYTHON_VERSION], [ge], [3.12], [
+ UL_WARN_ADD([-Wno-error=redundant-decls], [PYTHON_CFLAGS])
+ ])
+ ]
)
])
subdir : 'libmount',
link_with : lib_mount,
dependencies : python.dependency(),
- c_args : [ '-Wno-cast-function-type' ],
+ c_args : [
+ '-Wno-cast-function-type',
+
+ # https://github.com/util-linux/util-linux/issues/2366
+ python.language_version().version_compare('>=3.12') ?
+ [ '-Wno-error=redundant-decls' ] : [],
+ ],
install : true)
if build_python