Only compile bytecode otherwise, avoiding ocamlfind's helpful error
message "ocamlfind: Not supported in your configuration: ocamlopt"
(Successfully tested on Debian/unstable on alpha)
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).
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)