]> matita.cs.unibo.it Git - helm.git/commitdiff
- "ocaml/" -> "libs/" in the distribution
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 2 Feb 2006 10:57:27 +0000 (10:57 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 2 Feb 2006 10:57:27 +0000 (10:57 +0000)
- fresh copy of configure.ac

helm/Makefile
helm/configure.ac [new file with mode: 0644]

index 493f383da8b25d92d7dd785563d3f7101aa2d3c2..2eb93cd411b7136dc1a820d1758658dd496634ba 100644 (file)
@@ -25,6 +25,7 @@ export:
        svn export ocaml $(DISTDIR)/ocaml
        svn export matita $(DISTDIR)/matita
        (cd $(DISTDIR) && rm -f $(CLEAN_ON_DIST))
+       mv $(DISTDIR)/ocaml $(DISTDIR)/libs
        cp -r $(EXTRA_DIST) $(DISTDIR)
 
 mktarball:
diff --git a/helm/configure.ac b/helm/configure.ac
new file mode 100644 (file)
index 0000000..c07a962
--- /dev/null
@@ -0,0 +1,134 @@
+AC_INIT(matitaTypes.ml)
+
+# Distribution settings (i.e. settings to be manipulated before a release)
+DEBUG_DEFAULT="true"
+RT_BASE_DIR_DEFAULT="`pwd`"
+MATITA_VERSION="0.0.1"
+# End of distribution settings
+
+AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
+if test $HAVE_OCAMLC = "no"; then
+  AC_MSG_ERROR(could not find ocamlc)
+fi
+AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
+if test $HAVE_OCAMLOPT = "no"; then
+  AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
+fi
+AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
+if test $HAVE_OCAMLFIND = "yes"; then
+  OCAMLFIND="ocamlfind"
+else
+  AC_MSG_ERROR(could not find ocamlfind)
+fi
+AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
+if test $HAVE_LABLGLADECC = "yes"; then
+  LABLGLADECC="lablgladecc2"
+else
+  AC_MSG_ERROR(could not find lablgladecc2)
+fi
+AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
+if test $HAVE_CAMLP4O = "yes"; then
+  CAMLP4O="camlp4o"
+else
+  AC_MSG_ERROR(could not find camlp4o)
+fi
+FINDLIB_COMREQUIRES="\
+helm-cic_disambiguation \
+helm-grafite \
+helm-grafite_engine \
+helm-grafite_parser \
+helm-hgdome \
+helm-tactics \
+"
+FINDLIB_CLEANREQUIRES="$FINDLIB_COMREQUIRES"
+FINDLIB_DEPREQUIRES="$FINDLIB_COMREQUIRES"
+FINDLIB_MAKEREQUIRES=" \
+helm-registry \
+helm-extlib \
+"
+FINDLIB_CREQUIRES=" \
+$FINDLIB_COMREQUIRES \
+"
+FINDLIB_REQUIRES="\
+$FINDLIB_CREQUIRES \
+lablgtk2.glade \
+lablgtkmathview \
+lablgtksourceview \
+helm-xmldiff \
+"
+for r in $FINDLIB_REQUIRES
+do
+  AC_MSG_CHECKING(for $r ocaml library)
+  if OCAMLPATH=../ocaml/METAS $OCAMLFIND query $r &> /dev/null; then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_ERROR(could not find $r ocaml library)
+  fi
+done
+
+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
+#     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
+#   fi
+# fi
+# 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
+#     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
+#   fi
+# fi
+if test "$OCAMLFIND_COMMANDS" != ""; then
+  OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
+fi
+
+AC_MSG_CHECKING(--enable-debug argument)
+AC_ARG_ENABLE(debug,
+  [  --enable-debug    Turn on debugging],
+  [GIVEN="yes";
+   case "${enableval}" in
+   yes) DEBUG=true ;;
+   no)  DEBUG=false ;;
+   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+  esac],
+  [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
+MSG=$GIVEN
+if test "$DEBUG" = "true"; then
+  MSG="$MSG, debugging enabled."
+else
+  MSG="$MSG, debugging disabled."
+fi
+AC_MSG_RESULT($MSG)
+
+AC_MSG_CHECKING(--with-runtime-dir argument)
+AC_ARG_WITH(runtime-dir,
+  [ --with-runtime-dir Runtime directory (current working directory if not given)],
+  [ RT_BASE_DIR="${withval}" ],
+  [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
+AC_MSG_RESULT($RT_BASE_DIR)
+
+AC_SUBST(CAMLP4O)
+AC_SUBST(DEBUG)
+AC_SUBST(TRANSFORMER_MODULE)
+AC_SUBST(FINDLIB_REQUIRES)
+AC_SUBST(FINDLIB_CREQUIRES)
+AC_SUBST(FINDLIB_DEPREQUIRES)
+AC_SUBST(FINDLIB_CLEANREQUIRES)
+AC_SUBST(FINDLIB_MAKEREQUIRES)
+AC_SUBST(HAVE_OCAMLOPT)
+AC_SUBST(LABLGLADECC)
+AC_SUBST(OCAMLFIND)
+AC_SUBST(RT_BASE_DIR)
+AC_SUBST(MATITA_VERSION)
+
+AC_OUTPUT([
+  matita.conf.xml.sample
+  buildTimeConf.ml
+  Makefile
+  gtkmathview.matita.conf.xml
+])