X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2Focaml%2Fconfigure.ac;fp=helm%2Focaml%2Fconfigure.ac;h=357d1018f1c89a31b77aa1f6247eca72727d4a1e;hp=0000000000000000000000000000000000000000;hb=792b5d29ebae8f917043d9dd226692919b5d6ca1;hpb=a14a8c7637fd0b95e9d4deccb20c6abc98e8f953 diff --git a/helm/ocaml/configure.ac b/helm/ocaml/configure.ac new file mode 100644 index 000000000..357d1018f --- /dev/null +++ b/helm/ocaml/configure.ac @@ -0,0 +1,60 @@ +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) +else + OCAMLFIND=ocamlfind +fi + +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 +AC_CHECK_PROG(HAVE_OCAMLDEP_OPT, ocamldep.opt, yes, no) +if test $HAVE_OCAMLDEP_OPT = "yes"; then + if test "$OCAMLFIND_COMMANDS" = ""; then + OCAMLFIND_COMMANDS="ocamldep=ocamldep.opt" + else + OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamldep=ocamldep.opt" + fi +fi +if test "$OCAMLFIND_COMMANDS" != ""; then + OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND" +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=`pwd`/METAS +AC_MSG_RESULT($OCAMLFIND_META_DIR) + +AC_SUBST(OCAMLFIND) +AC_SUBST(OCAMLFIND_DEST_DIR) +AC_SUBST(OCAMLFIND_META_DIR) + +AC_OUTPUT([ + Makefile + Makefile.common +]) +