diff options
author | Maxim Koltsov <kolmax94@gmail.com> | 2010-11-08 13:55:49 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-08 14:28:04 +0000 |
commit | af7af2fc5e48e4efecd1f65b60e61b88733161b9 (patch) | |
tree | 5fd081fbb51ce66dfaacd4e5b33715b7002bc6e9 /configure.ac | |
parent | 428a45c3e15f03e9861e1b551e1ae8da821dba5f (diff) | |
download | libguestfs-af7af2fc5e48e4efecd1f65b60e61b88733161b9.tar.gz libguestfs-af7af2fc5e48e4efecd1f65b60e61b88733161b9.tar.xz libguestfs-af7af2fc5e48e4efecd1f65b60e61b88733161b9.zip |
build: Add ./configure --disable-ocaml option.
This can be used to disable the OCaml bindings. Note that
OCaml is still required in any case where you need to rerun
the generator.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index d5afe8bb..f0d6ead5 100644 --- a/configure.ac +++ b/configure.ac @@ -489,15 +489,27 @@ AS_IF([test "x$enable_fuse" != "xno"], AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"]) dnl Check for OCaml (optional, for OCaml bindings). -AC_PROG_OCAML -AC_PROG_FINDLIB -AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"]) - -dnl Optional xml-light for running the generator. +OCAMLC=no +OCAMLFIND=no OCAML_PKG_xml_light=no -if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then - AC_CHECK_OCAML_PKG([xml-light]) -fi +AC_ARG_ENABLE([ocaml], + AS_HELP_STRING([--disable-ocaml], [Disable OCaml language bindings]), + [], + [enable_ocaml=yes]) +AS_IF([test "x$enable_ocaml" != "xno"], + [dnl OCAMLC and OCAMLFIND have to be unset first, otherwise + dnl AC_CHECK_TOOL (inside AC_PROG_OCAML) will not look. + OCAMLC= + OCAMLFIND= + AC_PROG_OCAML + AC_PROG_FINDLIB + + dnl Optional xml-light for running the generator. + if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then + AC_CHECK_OCAML_PKG([xml-light]) + fi]) +AM_CONDITIONAL([HAVE_OCAML], + [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"]) AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"]) dnl Build the OCaml viewer example. This has a lengthy list of |