f001a4af3f
Package the ocaml bindings into a subpackage.
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
From c05f1005c2629237843db9c0830ba40d08b5516e Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Sat, 3 Aug 2019 15:17:53 +0100
|
|
Subject: [PATCH 10/11] build: Add ./configure --disable-ocaml to disable OCaml
|
|
bindings.
|
|
|
|
This can be used to disable the OCaml language bindings if you don't
|
|
want to build those. The OCaml toplevel is still needed to run the
|
|
generator, in particular in the case where you want to build from git.
|
|
---
|
|
configure.ac | 16 ++++++++++++----
|
|
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 8c47e61..ade8ab0 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -197,10 +197,6 @@ dnl bindings.
|
|
AC_PROG_OCAML
|
|
AC_PROG_FINDLIB
|
|
AM_CONDITIONAL([HAVE_OCAML_TOPLEVEL],[test "x$OCAML" != "xno"])
|
|
-AM_CONDITIONAL([HAVE_OCAML],
|
|
- [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
|
|
-AM_CONDITIONAL([HAVE_OCAMLOPT],
|
|
- [test "x$OCAMLOPT" != "xno" && test "x$OCAMLFIND" != "xno"])
|
|
|
|
dnl Flags we want to pass to every OCaml compiler call.
|
|
OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3"
|
|
@@ -208,6 +204,18 @@ AC_SUBST([OCAML_WARN_ERROR])
|
|
OCAML_FLAGS="-g -annot -safe-string"
|
|
AC_SUBST([OCAML_FLAGS])
|
|
|
|
+dnl Note this only disables the OCaml bindings.
|
|
+AC_ARG_ENABLE([ocaml],
|
|
+ AS_HELP_STRING([--disable-ocaml], [disable OCaml language bindings]),
|
|
+ [],
|
|
+ [enable_ocaml=yes])
|
|
+AM_CONDITIONAL([HAVE_OCAML],
|
|
+ [test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \
|
|
+ test "x$enable_ocaml" = "xyes"])
|
|
+AM_CONDITIONAL([HAVE_OCAMLOPT],
|
|
+ [test "x$OCAMLOPT" != "xno" && test "x$OCAMLFIND" != "xno" && \
|
|
+ test "x$enable_ocaml" = "xyes"])
|
|
+
|
|
dnl Python, optional for the Python bindings and shell.
|
|
PYTHON_PREFIX=
|
|
PYTHON_VERSION=
|
|
--
|
|
2.22.0
|
|
|