@ -37,7 +37,7 @@ dnl For documentation, please read the ocaml.m4 man page.
AC_DEFUN([AC_PROG_OCAML],
AC_DEFUN([AC_PROG_OCAML],
[dnl
[dnl
# checking for ocamlc
# checking for ocamlc
AC_CHECK _TOOL([OCAMLC],[ocamlc],[no])
AC_PATH _TOOL([OCAMLC],[ocamlc],[no])
if test "$OCAMLC" != "no"; then
if test "$OCAMLC" != "no"; then
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
@ -54,7 +54,7 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLLIB])
AC_SUBST([OCAMLLIB])
# checking for ocamlopt
# checking for ocamlopt
AC_CHECK _TOOL([OCAMLOPT],[ocamlopt],[no])
AC_PATH _TOOL([OCAMLOPT],[ocamlopt],[no])
OCAMLBEST=byte
OCAMLBEST=byte
if test "$OCAMLOPT" = "no"; then
if test "$OCAMLOPT" = "no"; then
AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
@ -71,7 +71,7 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLBEST])
AC_SUBST([OCAMLBEST])
# checking for ocamlc.opt
# checking for ocamlc.opt
AC_CHECK _TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
AC_PATH _TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
if test "$OCAMLCDOTOPT" != "no"; then
if test "$OCAMLCDOTOPT" != "no"; then
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -83,7 +83,7 @@ AC_DEFUN([AC_PROG_OCAML],
# checking for ocamlopt.opt
# checking for ocamlopt.opt
if test "$OCAMLOPT" != "no" ; then
if test "$OCAMLOPT" != "no" ; then
AC_CHECK _TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
AC_PATH _TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
if test "$OCAMLOPTDOTOPT" != "no"; then
if test "$OCAMLOPTDOTOPT" != "no"; then
TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -112,31 +112,31 @@ AC_DEFUN([AC_PROG_OCAML],
AC_SUBST([OCAMLNATDYNLINK])
AC_SUBST([OCAMLNATDYNLINK])
# checking for ocaml toplevel
# checking for ocaml toplevel
AC_CHECK _TOOL([OCAML],[ocaml],[no])
AC_PATH _TOOL([OCAML],[ocaml],[no])
# checking for ocamldep
# checking for ocamldep
AC_CHECK _TOOL([OCAMLDEP],[ocamldep],[no])
AC_PATH _TOOL([OCAMLDEP],[ocamldep],[no])
# checking for ocamlmktop
# checking for ocamlmktop
AC_CHECK _TOOL([OCAMLMKTOP],[ocamlmktop],[no])
AC_PATH _TOOL([OCAMLMKTOP],[ocamlmktop],[no])
# checking for ocamlmklib
# checking for ocamlmklib
AC_CHECK _TOOL([OCAMLMKLIB],[ocamlmklib],[no])
AC_PATH _TOOL([OCAMLMKLIB],[ocamlmklib],[no])
# checking for ocamldoc
# checking for ocamldoc
AC_CHECK _TOOL([OCAMLDOC],[ocamldoc],[no])
AC_PATH _TOOL([OCAMLDOC],[ocamldoc],[no])
# checking for ocamlbuild
# checking for ocamlbuild
AC_CHECK _TOOL([OCAMLBUILD],[ocamlbuild],[no])
AC_PATH _TOOL([OCAMLBUILD],[ocamlbuild],[no])
])
])
AC_DEFUN([AC_PROG_OCAMLLEX],
AC_DEFUN([AC_PROG_OCAMLLEX],
[dnl
[dnl
# checking for ocamllex
# checking for ocamllex
AC_CHECK _TOOL([OCAMLLEX],[ocamllex],[no])
AC_PATH _TOOL([OCAMLLEX],[ocamllex],[no])
if test "$OCAMLLEX" != "no"; then
if test "$OCAMLLEX" != "no"; then
AC_CHECK _TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
AC_PATH _TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
if test "$OCAMLLEXDOTOPT" != "no"; then
if test "$OCAMLLEXDOTOPT" != "no"; then
OCAMLLEX=$OCAMLLEXDOTOPT
OCAMLLEX=$OCAMLLEXDOTOPT
fi
fi
@ -146,7 +146,7 @@ AC_DEFUN([AC_PROG_OCAMLLEX],
AC_DEFUN([AC_PROG_OCAMLYACC],
AC_DEFUN([AC_PROG_OCAMLYACC],
[dnl
[dnl
AC_CHECK _TOOL([OCAMLYACC],[ocamlyacc],[no])
AC_PATH _TOOL([OCAMLYACC],[ocamlyacc],[no])
AC_SUBST([OCAMLYACC])
AC_SUBST([OCAMLYACC])
])
])
@ -156,7 +156,7 @@ AC_DEFUN([AC_PROG_CAMLP4],
AC_REQUIRE([AC_PROG_OCAML])dnl
AC_REQUIRE([AC_PROG_OCAML])dnl
# checking for camlp4
# checking for camlp4
AC_CHECK _TOOL([CAMLP4],[camlp4],[no])
AC_PATH _TOOL([CAMLP4],[camlp4],[no])
if test "$CAMLP4" != "no"; then
if test "$CAMLP4" != "no"; then
TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
@ -167,14 +167,14 @@ AC_DEFUN([AC_PROG_CAMLP4],
AC_SUBST([CAMLP4])
AC_SUBST([CAMLP4])
# checking for companion tools
# checking for companion tools
AC_CHECK _TOOL([CAMLP4BOOT],[camlp4boot],[no])
AC_PATH _TOOL([CAMLP4BOOT],[camlp4boot],[no])
AC_CHECK _TOOL([CAMLP4O],[camlp4o],[no])
AC_PATH _TOOL([CAMLP4O],[camlp4o],[no])
AC_CHECK _TOOL([CAMLP4OF],[camlp4of],[no])
AC_PATH _TOOL([CAMLP4OF],[camlp4of],[no])
AC_CHECK _TOOL([CAMLP4OOF],[camlp4oof],[no])
AC_PATH _TOOL([CAMLP4OOF],[camlp4oof],[no])
AC_CHECK _TOOL([CAMLP4ORF],[camlp4orf],[no])
AC_PATH _TOOL([CAMLP4ORF],[camlp4orf],[no])
AC_CHECK _TOOL([CAMLP4PROF],[camlp4prof],[no])
AC_PATH _TOOL([CAMLP4PROF],[camlp4prof],[no])
AC_CHECK _TOOL([CAMLP4R],[camlp4r],[no])
AC_PATH _TOOL([CAMLP4R],[camlp4r],[no])
AC_CHECK _TOOL([CAMLP4RF],[camlp4rf],[no])
AC_PATH _TOOL([CAMLP4RF],[camlp4rf],[no])
AC_SUBST([CAMLP4BOOT])
AC_SUBST([CAMLP4BOOT])
AC_SUBST([CAMLP4O])
AC_SUBST([CAMLP4O])
AC_SUBST([CAMLP4OF])
AC_SUBST([CAMLP4OF])
@ -191,7 +191,7 @@ AC_DEFUN([AC_PROG_FINDLIB],
AC_REQUIRE([AC_PROG_OCAML])dnl
AC_REQUIRE([AC_PROG_OCAML])dnl
# checking for ocamlfind
# checking for ocamlfind
AC_CHECK _TOOL([OCAMLFIND],[ocamlfind],[no])
AC_PATH _TOOL([OCAMLFIND],[ocamlfind],[no])
AC_SUBST([OCAMLFIND])
AC_SUBST([OCAMLFIND])
])
])