]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/configure.ac
textual term editor is now the default one
[helm.git] / helm / ocaml / configure.ac
1 AC_INIT(Makefile.in)
2
3 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
4 if test $HAVE_OCAMLC = "no"; then
5   AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
6 fi
7
8 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
9 if test $HAVE_OCAMLFIND = "no"; then
10   AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
11 fi
12
13 AC_ARG_WITH(term-editor,
14               AS_HELP_STRING([--with-term-editor=(tex|textual)],
15                              [choose term editor (default is tex)]),
16               [TERM_EDITOR=$withval], [TERM_EDITOR=textual])
17 if test $TERM_EDITOR = "tex"; then
18   CHOSEN_TERM_EDITOR="include TexTermEditor"
19 else
20   if test $TERM_EDITOR = "textual"; then
21     CHOSEN_TERM_EDITOR="include TermEditor"
22   else
23     AC_MSG_ERROR(unknwon term editor $TERM_EDITOR)
24   fi
25 fi
26
27 AC_ARG_WITH(term-parser,
28               AS_HELP_STRING([--with-term-parser=(cscTex|cscTextual|new)],
29                              [choose term parser (default is new)]),
30               [TERM_PARSER=$withval], [TERM_PARSER=new])
31 if test $TERM_PARSER = "cscTex"; then
32   CHOSEN_TERM_PARSER="include CSCTexDisambiguatingParser"
33 else
34   if test $TERM_PARSER = "cscTextual"; then
35     CHOSEN_TERM_PARSER="include CSCTextualDisambiguatingParser"
36   else
37     if test $TERM_PARSER = "new"; then
38       CHOSEN_TERM_PARSER="include AndreaAndZackDisambiguatingParser"
39     else
40       AC_MSG_ERROR(unknwon term parser $TERM_PARSER)
41     fi
42   fi
43 fi
44
45 AC_ARG_WITH(transformer,
46               AS_HELP_STRING([--with-transformer=(xslt|ocaml)],
47                              [choose mathml transformer (default is ocaml)]),
48               [TRANSFORMER=$withval], [TRANSFORMER=ocaml])
49 if test $TRANSFORMER = "xslt"; then
50   CHOSEN_TRANSFORMER="include ApplyStylesheets"
51 else
52   if test $TRANSFORMER = "ocaml"; then
53     CHOSEN_TRANSFORMER="include ApplyTransformation"
54   else
55     AC_MSG_ERROR(unknwon transformer $TRANSFORMER)
56   fi
57 fi
58
59 AC_MSG_CHECKING("where to install the library")
60 OCAMLFIND_DEST_DIR="/public/sacerdot/prova"
61 AC_MSG_RESULT($OCAMLFIND_DEST_DIR)
62
63 AC_MSG_CHECKING("where to install the META files")
64 OCAMLFIND_META_DIR="/public/sacerdot/prova/META"
65 AC_MSG_RESULT($OCAMLFIND_META_DIR)
66
67 AC_SUBST(OCAMLFIND_DEST_DIR)
68 AC_SUBST(OCAMLFIND_META_DIR)
69 AC_SUBST(CHOSEN_TERM_EDITOR)
70 AC_SUBST(CHOSEN_TERM_PARSER)
71 AC_SUBST(CHOSEN_TRANSFORMER)
72
73 AC_OUTPUT([
74   Makefile
75   Makefile.common
76   ../gTopLevel/chosenTransformer.ml
77   ../gTopLevel/chosenTermEditor.ml
78   ../gTopLevel/disambiguatingParser.ml
79 ])
80