]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/configure.ac
snapshort
[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 if test $TERM_EDITOR = "tex"; then
64   CHOSEN_TERM_EDITOR="include TexTermEditor"
65 else
66   if test $TERM_EDITOR = "textual"; then
67     CHOSEN_TERM_EDITOR="include TermEditor"
68   else
69     AC_MSG_ERROR(unknwon term editor $TERM_EDITOR)
70   fi
71 fi
72
73 AC_SUBST(OCAMLFIND)
74 AC_SUBST(CHOSEN_TERM_EDITOR)
75 AC_SUBST(CHOSEN_TERM_PARSER)
76
77 AC_OUTPUT([
78   chosenTermEditor.ml
79   disambiguatingParser.ml
80   Makefile
81 ])
82