From de767439f800b7e6069163cf5eea29b2df76070b Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Thu, 9 Sep 2021 15:09:26 -0400 Subject: [PATCH] Fix: build with `--enable-python-bindings` fails Issue ===== Configuring with the following option: `./configure --disable-man-pages --enable-python-bindings` makes the build fails with the following error: make[4]: Entering directory '/home/frdeso/projets/babeltrace/src/bindings/python/bt2' touch copy-static-deps.stamp SWIG bt2/native_bt.c /bin/bash: -MD: command not found This error is due to the fact that the `SWIG` automake variable is empty leading to that unexpected `-MD: command not found` error. Currently, in the `configure.ac`, the `SWIG` variable is only set when the `--enable-python-plugins` is enabled. This is wrong because it's the bindings that require SWIG. Fix === Define the `SWIG` variable when the bindings are enabled. Note ==== Enabling the plugins requires also enabling the bindings. Signed-off-by: Francis Deslauriers Change-Id: Ie6eb21c5bd2ebc1fa97751148b44c8e9263dcf0c Reviewed-on: https://review.lttng.org/c/babeltrace/+/6378 Tested-by: jenkins Reviewed-by: Michael Jeanson --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 068b9535..590627f6 100644 --- a/configure.ac +++ b/configure.ac @@ -482,7 +482,7 @@ AC_SUBST([ENABLE_DEBUG_INFO_VAL]) ## ## # The Python bindings require SWIG -AE_IF_FEATURE_ENABLED([python-plugins], +AE_IF_FEATURE_ENABLED([python-bindings], [AX_PKG_SWIG(2.0.0, [], [AC_MSG_ERROR([SWIG 2.0.0 or newer is required to build the python bindings])])] ) -- 2.34.1