AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
if test $HAVE_OCAMLFIND = "no"; then
AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
-fi
-
-AC_ARG_WITH(term-editor,
- AS_HELP_STRING([--with-term-editor=(tex|textual)],
- [choose term editor (default is tex)]),
- [TERM_EDITOR=$withval], [TERM_EDITOR=tex])
-if test $TERM_EDITOR = "tex"; then
- CHOSEN_TERM_EDITOR="include TexTermEditor"
else
- if test $TERM_EDITOR = "textual"; then
- CHOSEN_TERM_EDITOR="include TermEditor"
- else
- AC_MSG_ERROR(unknwon term editor $TERM_EDITOR)
- fi
+ OCAMLFIND=ocamlfind
fi
-AC_ARG_WITH(term-parser,
- AS_HELP_STRING([--with-term-parser=(cscTex|cscTextual|new)],
- [choose term parser (default is new)]),
- [TERM_PARSER=$withval], [TERM_PARSER=new])
-if test $TERM_PARSER = "cscTex"; then
- CHOSEN_TERM_PARSER="include CSCTexDisambiguatingParser"
-else
- if test $TERM_PARSER = "cscTextual"; then
- CHOSEN_TERM_PARSER="include CSCTextualDisambiguatingParser"
+OCAMLFIND_COMMANDS=""
+AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
+if test $HAVE_OCAMLC_OPT = "yes"; then
+ if test "$OCAMLFIND_COMMANDS" = ""; then
+ OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
else
- if test $TERM_PARSER = "new"; then
- CHOSEN_TERM_PARSER="include AndreaAndZackDisambiguatingParser"
- else
- AC_MSG_ERROR(unknwon term parser $TERM_PARSER)
- fi
+ OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
fi
fi
-
-AC_ARG_WITH(transformer,
- AS_HELP_STRING([--with-transformer=(xslt|ocaml)],
- [choose mathml transformer (default is ocaml)]),
- [TRANSFORMER=$withval], [TRANSFORMER=ocaml])
-if test $TRANSFORMER = "xslt"; then
- CHOSEN_TRANSFORMER="include ApplyStylesheets"
-else
- if test $TRANSFORMER = "ocaml"; then
- CHOSEN_TRANSFORMER="include ApplyTransformation"
+AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
+if test $HAVE_OCAMLOPT_OPT = "yes"; then
+ if test "$OCAMLFIND_COMMANDS" = ""; then
+ OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
else
- AC_MSG_ERROR(unknwon transformer $TRANSFORMER)
+ OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
fi
fi
+if test "$OCAMLFIND_COMMANDS" != ""; then
+ OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
+fi
AC_MSG_CHECKING("where to install the library")
OCAMLFIND_DEST_DIR="/public/sacerdot/prova"
OCAMLFIND_META_DIR="/public/sacerdot/prova/META"
AC_MSG_RESULT($OCAMLFIND_META_DIR)
+AC_SUBST(OCAMLFIND)
AC_SUBST(OCAMLFIND_DEST_DIR)
AC_SUBST(OCAMLFIND_META_DIR)
AC_SUBST(CHOSEN_TERM_EDITOR)
AC_OUTPUT([
Makefile
Makefile.common
- ../gTopLevel/chosenTransformer.ml
- ../gTopLevel/chosenTermEditor.ml
- ../gTopLevel/disambiguatingParser.ml
])