Richard W.M. Jones
2015-Sep-18 14:01 UTC
[Libguestfs] [PATCH] configure: Require OCaml if we need to run the generator.
When building from git, you need OCaml to compile the generator to
build the generated files. Previously configure didn't detect that
situation, resulting in failed builds. This commit causes the
configure script to error out if the generated files are not present
and OCaml is not installed.
Note that you can still build without OCaml, if you get the generated
files from somewhere else. The source tarballs distributed on the
website contain the generated files.
---
configure.ac | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 8ff6ce5..31cabc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1117,6 +1117,15 @@ AM_CONDITIONAL([HAVE_OCAMLOPT],
AM_CONDITIONAL([HAVE_OCAMLDOC],
[test "x$OCAMLDOC" != "xno"])
+dnl OCaml is required if we need to run the generator.
+AS_IF([test "x$OCAMLC" = "xno"],[
+ AS_IF([! test -f $srcdir/src/guestfs_protocol.x],[
+ AC_MSG_FAILURE([OCaml compiler is required to build from git.
+If you don't have OCaml available, you should build from a
+tarball from http://libguestfs.org/download])
+ ])
+])
+
AS_IF([test "x$OCAMLC" != "xno"],[
dnl Check for <caml/unixsupport.h> header.
old_CPPFLAGS="$CPPFLAGS"
--
2.5.0
Maybe Matching Threads
- [PATCH 01/27] build: Make OCaml compiler required for all builds.
- enable build for ocaml bytecode
- [PATCH] Allow ./configure --without-qemu.
- [PATCH] Fix building on architectures where ocamlopt is not available
- [PATCH] build: Don't test for qemu virtio-serial at configure time.
