X-Git-Url: http://git.annexia.org/?p=virt-top.git;a=blobdiff_plain;f=m4%2Focaml.m4;h=479f3a86bb8335fbf0851790ab737980e201876d;hp=fa8c4cef43213371577c6b88c20ebb2018da211e;hb=HEAD;hpb=d0381948857fa48c1c1e24cac01997a57c067403 diff --git a/m4/ocaml.m4 b/m4/ocaml.m4 index fa8c4ce..479f3a8 100644 --- a/m4/ocaml.m4 +++ b/m4/ocaml.m4 @@ -16,7 +16,12 @@ AC_DEFUN([AC_PROG_OCAML], if test "$OCAMLC" != "no"; then OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'` AC_MSG_RESULT([OCaml version is $OCAMLVERSION]) - OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4` + # If OCAMLLIB is set, use it + if test "$OCAMLLIB" = ""; then + OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4` + else + AC_MSG_RESULT([OCAMLLIB previously set; preserving it.]) + fi AC_MSG_RESULT([OCaml library path is $OCAMLLIB]) AC_SUBST([OCAMLVERSION]) @@ -68,6 +73,9 @@ AC_DEFUN([AC_PROG_OCAML], AC_SUBST([OCAMLC]) + # checking for ocaml toplevel + AC_CHECK_TOOL([OCAML],[ocaml],[no]) + # checking for ocamldep AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no]) @@ -207,11 +215,26 @@ EOF dnl XXX Cross-compiling AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE], [dnl + AC_REQUIRE([AC_PROG_OCAML])dnl AC_MSG_CHECKING([for OCaml compiler word size]) cat > conftest.ml < conftest.ml <