]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/configure.ac
- bugfix: sequences like ".(" are now lexed, correctly, as
[helm.git] / helm / gTopLevel / configure.ac
1 AC_INIT(gTopLevel.ml)
2
3 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
4 if test $HAVE_OCAMLFIND = "yes"; then
5   OCAMLFIND="ocamlfind"
6 else
7   AC_MSG_ERROR(could not find ocamlfind)
8 fi
9 OCAMLFIND_COMMANDS=""
10 AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
11 if test $HAVE_OCAMLC_OPT = "yes"; then
12   if test "$OCAMLFIND_COMMANDS" = ""; then
13     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
14   else
15     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
16   fi
17 fi
18 AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
19 if test $HAVE_OCAMLOPT_OPT = "yes"; then
20   if test "$OCAMLFIND_COMMANDS" = ""; then
21     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
22   else
23     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
24   fi
25 fi
26 if test "$OCAMLFIND_COMMANDS" != ""; then
27   OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
28 fi
29
30
31 AC_ARG_WITH(term-editor,
32               AS_HELP_STRING([--with-term-editor=(tex|textual)],
33                              [choose term editor (default is tex)]),
34               [TERM_EDITOR=$withval], [TERM_EDITOR=textual])
35 if test $TERM_EDITOR = "tex"; then
36   CHOSEN_TERM_EDITOR="include TexTermEditor"
37 else
38   if test $TERM_EDITOR = "textual"; then
39     CHOSEN_TERM_EDITOR="include TermEditor"
40   else
41     AC_MSG_ERROR(unknwon term editor $TERM_EDITOR)
42   fi
43 fi
44
45 AC_ARG_WITH(term-parser,
46               AS_HELP_STRING([--with-term-parser=(cscTex|cscTextual|new)],
47                              [choose term parser (default is new)]),
48               [TERM_PARSER=$withval], [TERM_PARSER=new])
49 if test $TERM_PARSER = "cscTex"; then
50   CHOSEN_TERM_PARSER="include CSCTexDisambiguatingParser"
51 else
52   if test $TERM_PARSER = "cscTextual"; then
53     CHOSEN_TERM_PARSER="include CSCTextualDisambiguatingParser"
54   else
55     if test $TERM_PARSER = "new"; then
56       CHOSEN_TERM_PARSER="include AndreaAndZackDisambiguatingParser"
57     else
58       AC_MSG_ERROR(unknwon term parser $TERM_PARSER)
59     fi
60   fi
61 fi
62
63 AC_ARG_WITH(transformer,
64               AS_HELP_STRING([--with-transformer=(xslt|ocaml)],
65                              [choose mathml transformer (default is ocaml)]),
66               [TRANSFORMER=$withval], [TRANSFORMER=ocaml])
67 if test $TRANSFORMER = "xslt"; then
68   CHOSEN_TRANSFORMER="include ApplyStylesheets"
69 else
70   if test $TRANSFORMER = "ocaml"; then
71     CHOSEN_TRANSFORMER="include ApplyTransformation"
72   else
73     AC_MSG_ERROR(unknwon transformer $TRANSFORMER)
74   fi
75 fi
76
77 if test $TERM_EDITOR = "tex"; then
78   CHOSEN_TERM_EDITOR="include TexTermEditor"
79 else
80   if test $TERM_EDITOR = "textual"; then
81     CHOSEN_TERM_EDITOR="include TermEditor"
82   else
83     AC_MSG_ERROR(unknwon term editor $TERM_EDITOR)
84   fi
85 fi
86
87 AC_SUBST(OCAMLFIND)
88 AC_SUBST(CHOSEN_TERM_EDITOR)
89 AC_SUBST(CHOSEN_TERM_PARSER)
90 AC_SUBST(CHOSEN_TRANSFORMER)
91
92 AC_OUTPUT([
93   chosenTransformer.ml
94   chosenTermEditor.ml
95   disambiguatingParser.ml
96   Makefile
97 ])
98