Fix: build with `--enable-python-bindings` fails
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 9 Sep 2021 19:09:26 +0000 (15:09 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 13 Sep 2021 14:24:25 +0000 (10:24 -0400)
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>
configure.ac

index 068b9535e798e20101d7505698a268caa2047a94..590627f641e87c11787604799578ce20d6594c38 100644 (file)
@@ -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])])]
 )
 
This page took 0.0255609999999999 seconds and 4 git commands to generate.