X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2Fmatita%2Fconfigure.ac;h=2b8f535f0c211adf382062cc6304bc5c3f6c172d;hp=cc8d14a1384bc6b953b131fb16576da1a15ebb04;hb=b5d69130dd83587b5fb9cbb39251aaa8df8c456e;hpb=9226222b139844ebae3bddd6aef489d60e41e27a diff --git a/helm/matita/configure.ac b/helm/matita/configure.ac index cc8d14a13..2b8f535f0 100644 --- a/helm/matita/configure.ac +++ b/helm/matita/configure.ac @@ -1,5 +1,13 @@ 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" @@ -19,7 +27,14 @@ else AC_MSG_ERROR(could not find camlp4o) fi -FINDLIB_REQUIRES="lablgtk2.glade helm-registry" +FINDLIB_REQUIRES="\ +lablgtk2.glade \ +helm-cic_omdoc \ +helm-cic_transformations \ +helm-registry \ +helm-tactics \ +helm-xml \ +" for r in $FINDLIB_REQUIRES do AC_MSG_CHECKING(for $r ocaml library) @@ -30,10 +45,44 @@ do 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 + AC_SUBST(CAMLP4O) -AC_SUBST(LABLGLADECC) +AC_SUBST(DEBUG) AC_SUBST(FINDLIB_REQUIRES) +AC_SUBST(HAVE_OCAMLOPT) +AC_SUBST(LABLGLADECC) +AC_SUBST(OCAMLFIND) AC_OUTPUT([ buildTimeConf.ml