X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fconfigure.ac;h=bfaea8406697a6c4db4618c20bcfc9c42df9f295;hb=56415e42c04f40e9c8f7cfc59a3a3d87c3d373f7;hp=cc0c50349ed1c8b1556e6f68de9f42cb681a8ba5;hpb=c5d4ad1c98c1434b95a8a9b1c8697dd36cf39623;p=helm.git diff --git a/helm/matita/configure.ac b/helm/matita/configure.ac index cc0c50349..bfaea8406 100644 --- a/helm/matita/configure.ac +++ b/helm/matita/configure.ac @@ -1,19 +1,25 @@ AC_INIT(matita.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" 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" @@ -21,9 +27,65 @@ else AC_MSG_ERROR(could not find camlp4o) fi -AC_SUBST(OCAMLFIND) +FINDLIB_REQUIRES="\ +lablgtk2.glade \ +pcre \ +helm-cic_omdoc \ +helm-cic_transformations \ +helm-registry \ +helm-tactics \ +helm-xml \ +helm-disambiguator \ +helm-mathql_interpreter \ +" +for r in $FINDLIB_REQUIRES +do + AC_MSG_CHECKING(for $r ocaml library) + if $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_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 + AC_SUBST(CAMLP4O) +AC_SUBST(DEBUG) +AC_SUBST(FINDLIB_REQUIRES) +AC_SUBST(HAVE_OCAMLOPT) AC_SUBST(LABLGLADECC) +AC_SUBST(OCAMLFIND) AC_OUTPUT([ buildTimeConf.ml