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 <francis.deslauriers@efficios.com>
Change-Id: Ie6eb21c5bd2ebc1fa97751148b44c8e9263dcf0c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/6378
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
## ##
# 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])])]
)