]> matita.cs.unibo.it Git - helm.git/commitdiff
new configure.ac with support for compile time configuration of termeditor/parser/...
authorStefano Zacchiroli <zack@upsilon.cc>
Sat, 24 Jan 2004 12:33:42 +0000 (12:33 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Sat, 24 Jan 2004 12:33:42 +0000 (12:33 +0000)
helm/ocaml/configure.ac [new file with mode: 0644]
helm/ocaml/configure.in [deleted file]

diff --git a/helm/ocaml/configure.ac b/helm/ocaml/configure.ac
new file mode 100644 (file)
index 0000000..d8221cd
--- /dev/null
@@ -0,0 +1,80 @@
+AC_INIT(Makefile.in)
+
+AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
+if test $HAVE_OCAMLC = "no"; then
+  AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
+fi
+
+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
+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"
+  else
+    if test $TERM_PARSER = "new"; then
+      CHOSEN_TERM_PARSER="include AndreaAndZackDisambiguatingParser"
+    else
+      AC_MSG_ERROR(unknwon term parser $TERM_PARSER)
+    fi
+  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"
+  else
+    AC_MSG_ERROR(unknwon transformer $TRANSFORMER)
+  fi
+fi
+
+AC_MSG_CHECKING("where to install the library")
+OCAMLFIND_DEST_DIR="/public/sacerdot/prova"
+AC_MSG_RESULT($OCAMLFIND_DEST_DIR)
+
+AC_MSG_CHECKING("where to install the META files")
+OCAMLFIND_META_DIR="/public/sacerdot/prova/META"
+AC_MSG_RESULT($OCAMLFIND_META_DIR)
+
+AC_SUBST(OCAMLFIND_DEST_DIR)
+AC_SUBST(OCAMLFIND_META_DIR)
+AC_SUBST(CHOSEN_TERM_EDITOR)
+AC_SUBST(CHOSEN_TERM_PARSER)
+AC_SUBST(CHOSEN_TRANSFORMER)
+
+AC_OUTPUT([
+  Makefile
+  Makefile.common
+  ../gTopLevel/chosenTransformer.ml
+  ../gTopLevel/chosenTermEditor.ml
+  ../gTopLevel/disambiguatingParser.ml
+])
+
diff --git a/helm/ocaml/configure.in b/helm/ocaml/configure.in
deleted file mode 100644 (file)
index d586e33..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-AC_INIT(Makefile.in)
-
-AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
-if test $HAVE_OCAMLC = "no"; then
-  AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
-fi
-
-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_MSG_CHECKING("where to install the library")
-OCAMLFIND_DEST_DIR="/public/sacerdot/prova"
-AC_MSG_RESULT($OCAMLFIND_DEST_DIR)
-
-AC_MSG_CHECKING("where to install the META files")
-OCAMLFIND_META_DIR="/public/sacerdot/prova/META"
-AC_MSG_RESULT($OCAMLFIND_META_DIR)
-
-AC_SUBST(OCAMLFIND_DEST_DIR)
-AC_SUBST(OCAMLFIND_META_DIR)
-
-AC_OUTPUT([
-  Makefile
-  Makefile.common
-])