hivex: Fix for endianess bug.
[hivex.git] / configure.ac
index 9528b3e..65aa538 100644 (file)
@@ -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).
@@ -192,9 +193,9 @@ if test "x$OCAMLC" != "xno"; then
     echo "char $f (); char foo() { return $f (); }" > conftest.c
     rm -f conftest_ml.ml
     touch conftest_ml.ml
-    if $OCAMLOPT -c conftest.c 2>/dev/null && \
-       $OCAMLOPT -c conftest_ml.ml 2>/dev/null && \
-       $OCAMLOPT conftest.o conftest_ml.cmx -o conftest 2>/dev/null ; then
+    if $OCAMLC -c conftest.c 2>/dev/null && \
+       $OCAMLC -c conftest_ml.ml 2>/dev/null && \
+       $OCAMLC conftest.o conftest_ml.cmo -o conftest 2>/dev/null ; then
         AC_DEFINE([HAVE_CAML_RAISE_WITH_ARGS],[1],
                   [Defined if function caml_raise_with_args exists.])
         AC_MSG_RESULT([found])