[Libguestfs] [libnbd PATCH 3/3] configure: Do not misuse enable_ocaml

Martin Kletzander mkletzan at redhat.com
Wed Sep 22 12:09:18 UTC 2021

That switch is documented to control the building of bindings, not running the
generator.  For that reason the conditional should disregard the value of
enable_ocaml otherwise the generator cannot be run without building the

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
 configure.ac | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ab175808fba5..1e7194471339 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,8 +377,9 @@ AM_CONDITIONAL([HAVE_OCAMLDOC],
 dnl HAVE_OCAMLC can be used to detect if we are able to run the
 dnl generator.  We should NOT require ocamlfind for this.
-    [test "x$OCAMLC" != "xno" && test "x$enable_ocaml" = "xyes"])
+dnl Neither should this be dependent on --enable-ocaml, which
+dnl should only control the building of OCaml bindings.
+AM_CONDITIONAL([HAVE_OCAMLC], [test "x$OCAMLC" != "xno"])
 dnl Check if OCaml has caml_alloc_custom_mem (added late 2018).
 AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \

More information about the Libguestfs mailing list