From: Hilko Bengen Date: Wed, 11 May 2011 22:04:19 +0000 (+0200) Subject: hivex: check for presence of OCaml native compiler X-Git-Tag: 1.2.6~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=5cf4fc2caa34ccb3a1e01bbec912158127dcd169;p=hivex.git hivex: check for presence of OCaml native compiler Only compile bytecode otherwise, avoiding ocamlfind's helpful error message "ocamlfind: Not supported in your configuration: ocamlopt" (Successfully tested on Debian/unstable on alpha) --- diff --git a/configure.ac b/configure.ac index b3e5c40..65aa538 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,7 @@ dnl Check for OCaml (optional, for OCaml bindings). AC_PROG_OCAML AC_PROG_FINDLIB AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLC" != "xno" -a "x$OCAMLFIND" != "xno"]) +AM_CONDITIONAL([HAVE_OCAMLOPT], [test "x$OCAMLOPT" != "xno" -a "x$OCAMLFIND" != "xno"]) if test "x$OCAMLC" != "xno"; then dnl Check if we have caml/unixsupport.h header (OCaml bindings only). diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index b9451e3..fee3b88 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -31,7 +31,11 @@ AM_CPPFLAGS = \ if HAVE_OCAML -noinst_DATA = mlhivex.cma mlhivex.cmxa META +noinst_DATA = mlhivex.cma META + +if HAVE_OCAMLOPT +noinst_DATA += mlhivex.cmxa +endif OBJS = hivex_c.o hivex.cmo XOBJS = $(OBJS:.cmo=.cmx)