X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fconfigure.ac;h=7e2591f8fc9b1d9d2de2e524565a1edffa635f1a;hb=12cc5b2b8e7f7bb0b5e315094b008a293a4df6b1;hp=cc8d14a1384bc6b953b131fb16576da1a15ebb04;hpb=d651bf2e3d560e194fbe948dd950dd600a40eab6;p=helm.git diff --git a/helm/matita/configure.ac b/helm/matita/configure.ac index cc8d14a13..7e2591f8f 100644 --- a/helm/matita/configure.ac +++ b/helm/matita/configure.ac @@ -1,5 +1,13 @@ -AC_INIT(matita.ml) +AC_INIT(matitaTypes.ml) +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" @@ -18,22 +26,82 @@ if test $HAVE_CAMLP4O = "yes"; then else AC_MSG_ERROR(could not find camlp4o) fi - -FINDLIB_REQUIRES="lablgtk2.glade helm-registry" +FINDLIB_DEPREQUIRES="\ +pcre \ +mysql \ +helm-registry \ +helm-cic_textual_parser2 \ +" +FINDLIB_CLEANREQUIRES="$FINDLIB_DEPREQUIRES" +FINDLIB_CREQUIRES="\ +$FINDLIB_CLEANREQUIRES \ +unix \ +helm-cic_omdoc \ +helm-tactics \ +helm-xml \ +" +FINDLIB_REQUIRES="\ +$FINDLIB_CREQUIRES \ +lablgtk2.glade \ +lablgtkmathview \ +lablgtksourceview \ +helm-xmldiff \ +" for r in $FINDLIB_REQUIRES do AC_MSG_CHECKING(for $r ocaml library) - if $OCAMLFIND query $r &> /dev/null; then + 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 -AC_SUBST(OCAMLFIND) +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_ARG_ENABLE(debug, + [ --enable-debug Turn on debugging], + [case "${enableval}" in + yes) DEBUG=true ;; + no) DEBUG=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac], + [DEBUG=true]) +if test "$DEBUG" = "true"; then + echo "debugging enabled" +fi + +RT_BASE_DIR=`pwd` + AC_SUBST(CAMLP4O) -AC_SUBST(LABLGLADECC) +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(HAVE_OCAMLOPT) +AC_SUBST(LABLGLADECC) +AC_SUBST(OCAMLFIND) +AC_SUBST(RT_BASE_DIR) AC_OUTPUT([ buildTimeConf.ml