AC_SUBST(OCAMLVERSION)
-dnl ocamlyacc and ocamllex are not needed
#detect ocamlyacc
-dnl OCAMLYACC=ocamlyacc
-dnl AC_ARG_WITH([ocamlyacc],
-dnl AS_HELP_STRING([--with-ocamlyacc=PATH], [location of the ocamlyacc binary]),
-dnl [OCAMLYACC="$withval"])
-dnl AC_MSG_CHECKING([for ocamlyacc ($OCAMLYACC)])
-dnl OCAMLYACC_VERSION=$($OCAMLYACC -version 2>/dev/null || echo foo)
-dnl case "$OCAMLYACC_VERSION" in
-dnl *$OCAMLVERSION)
-dnl AC_MSG_RESULT([ok])
-dnl ;;
-dnl foo)
-dnl AC_MSG_RESULT([failed])
-dnl AC_MSG_ERROR([Cannot find ocamlyacc])
-dnl ;;
-dnl *)
-dnl AC_MSG_RESULT([failed])
-dnl AC_MSG_ERROR([Bad ocamlyacc version])
-dnl ;;
-dnl esac
-dnl AC_SUBST([OCAMLYACC])
-
-dnl #detect ocamllex
-dnl OCAMLLEX=ocamllex
-dnl AC_ARG_WITH([ocamllex],
-dnl AS_HELP_STRING([--with-ocamllex=PATH], [location of the ocamllex binary]),
-dnl [OCAMLLEX="$withval"])
-dnl AC_MSG_CHECKING([for ocamllex ($OCAMLLEX)])
-dnl OCAMLLEX_VERSION=$($OCAMLLEX -version 2>/dev/null || echo foo)
-dnl case "$OCAMLLEX_VERSION" in
-dnl *$OCAMLVERSION)
-dnl AC_MSG_RESULT([ok])
-dnl ;;
-dnl foo)
-dnl AC_MSG_RESULT([failed])
-dnl AC_MSG_ERROR([Cannot find ocamllex])
-dnl ;;
-dnl *)
-dnl AC_MSG_RESULT([failed])
-dnl AC_MSG_ERROR([Bad ocamllex version])
-dnl ;;
-dnl esac
-dnl AC_SUBST([OCAMLLEX])
+OCAMLYACC=ocamlyacc
+AC_ARG_WITH([ocamlyacc],
+ AS_HELP_STRING([--with-ocamlyacc=PATH], [location of the ocamlyacc binary]),
+ [OCAMLYACC="$withval"])
+AC_MSG_CHECKING([for ocamlyacc ($OCAMLYACC)])
+OCAMLYACC_VERSION=$($OCAMLYACC -version 2>/dev/null || echo foo)
+case "$OCAMLYACC_VERSION" in
+ *$OCAMLVERSION)
+ AC_MSG_RESULT([ok])
+ ;;
+ foo)
+ AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([Cannot find ocamlyacc])
+ ;;
+ *)
+ AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([Bad ocamlyacc version])
+ ;;
+esac
+AC_SUBST([OCAMLYACC])
+
+#detect ocamllex
+OCAMLLEX=ocamllex
+AC_ARG_WITH([ocamllex],
+ AS_HELP_STRING([--with-ocamllex=PATH], [location of the ocamllex binary]),
+ [OCAMLLEX="$withval"])
+AC_MSG_CHECKING([for ocamllex ($OCAMLLEX)])
+OCAMLLEX_VERSION=$($OCAMLLEX -version 2>/dev/null || echo foo)
+case "$OCAMLLEX_VERSION" in
+ *$OCAMLVERSION)
+ AC_MSG_RESULT([ok])
+ ;;
+ foo)
+ AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([Cannot find ocamllex])
+ ;;
+ *)
+ AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([Bad ocamllex version])
+ ;;
+esac
+AC_SUBST([OCAMLLEX])
#detect camlp4
AC_MSG_ERROR([Cannot find ulex.])
fi
-
-MENHIR=menhir
-AC_ARG_WITH([menhir],
- AS_HELP_STRING([--with-menhir=PATH], [location of the menhir binary]),
- [MENHIR="$withval"])
-
-AC_MSG_CHECKING([for menhir ($MENHIR)])
-
-MENHIR_VERSION=$($MENHIR --version 2>/dev/null || echo not_found)
-MENHIR_VERSION=$(echo "$MENHIR_VERSION" | cut -f 2- -d ',' | cut -f 2- -d ' ')
-case "$MENHIR_VERSION" in
- 'version 201'[[0-9]]*)
- AC_MSG_RESULT([ok (${MENHIR_VERSION})])
- ;;
- not_found)
- AC_MSG_RESULT([failed])
- AC_MSG_ERROR([Cannot find menhir])
- ;;
- *)
- AC_MSG_RESULT([failed])
- AC_MSG_ERROR([Your version of menhir is too old (${MENHIR_VERSION})])
- ;;
-esac
-AC_SUBST([MENHIR])
-
-
AC_MSG_CHECKING([for expat])
expat_path=`$OCAMLFIND query expat 2>/dev/null`
if test "$expat_path" ; then
#compilation options
#debugging mode
-OCAMLFLAGS=$OCAMLFLAGS
+OCAMLFLAGS="-principal -warn-error @3 $OCAMLFLAGS"
CAMLP4FLAGS=$CAMLP4FLAGS
OCAMLCFLAGS=$OCAMLCFLAGS
OCAMLOPTFLAGS=$OCAMLOPTFLAGS