1
From: Mehdi Dogguy <mehdi@debian.org>
2
Date: Thu, 9 Oct 2014 09:36:03 +0200
3
Subject: Set OCAMLBEST to native when ocamlopt is present
5
The goal of this patch is mainly to have an OCAMLBEST variable in the
6
Makefile that can be overriden externally when calling 'make'. This
7
can be useful to override upstream's choice on when we should consider
8
some architecture as a native architecture.
10
Makefile.in | 9 ++-------
13
3 files changed, 4 insertions(+), 9 deletions(-)
15
diff --git a/Makefile.in b/Makefile.in
16
index 7ae9cfd..3fda420 100644
19
@@ -27,12 +27,7 @@ INSTALL = $(OCAMLFIND) install -destdir $(LIBDIR)
20
UNINSTALL = $(OCAMLFIND) remove -destdir $(LIBDIR)
24
-ifeq ("@OCAMLBEST@","opt")
29
+OCAMLBEST ?= @OCAMLBEST@
31
DIST_DIR = $(NAME)-$(VERSION)
32
DIST_TARBALL = $(DIST_DIR).tar.gz
33
@@ -45,7 +40,7 @@ OPTLIBS=
37
-ifeq ("@OCAMLBEST@","opt")
38
+ifeq ($(OCAMLBEST),native)
39
OPTLIBS += $(BYTELIBS:%.cma=%.cmxa)
40
CMXSLIBS += $(BYTELIBS:%.cma=%.cmxs)
42
diff --git a/configure b/configure
43
index 78a0825..a191063 100755
46
@@ -2245,7 +2245,7 @@ $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2
47
$as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
55
diff --git a/m4/ocaml.m4 b/m4/ocaml.m4
56
index e0eec61..98dc591 100644
59
@@ -38,7 +38,7 @@ AC_DEFUN([AC_PROG_OCAML],
60
AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])