]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/configure.ac
test branch
[helm.git] / helm / ocaml / configure.ac
1 AC_INIT(Makefile.in)
2
3 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
4 if test $HAVE_OCAMLC = "no"; then
5   AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
6 fi
7
8 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
9 if test $HAVE_OCAMLFIND = "no"; then
10   AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
11 else
12   OCAMLFIND=ocamlfind
13 fi
14
15 OCAMLFIND_COMMANDS=""
16 AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
17 if test $HAVE_OCAMLC_OPT = "yes"; then
18   if test "$OCAMLFIND_COMMANDS" = ""; then
19     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
20   else
21     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
22   fi
23 fi
24 AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
25 if test $HAVE_OCAMLOPT_OPT = "yes"; then
26   if test "$OCAMLFIND_COMMANDS" = ""; then
27     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
28   else
29     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
30   fi
31 fi
32 AC_CHECK_PROG(HAVE_OCAMLDEP_OPT, ocamldep.opt, yes, no)
33 if test $HAVE_OCAMLDEP_OPT = "yes"; then
34   if test "$OCAMLFIND_COMMANDS" = ""; then
35     OCAMLFIND_COMMANDS="ocamldep=ocamldep.opt"
36   else
37     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamldep=ocamldep.opt"
38   fi
39 fi
40 if test "$OCAMLFIND_COMMANDS" != ""; then
41   OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
42 fi
43
44 AC_MSG_CHECKING("where to install the library")
45 OCAMLFIND_DEST_DIR="/public/sacerdot/prova"
46 AC_MSG_RESULT($OCAMLFIND_DEST_DIR)
47
48 AC_MSG_CHECKING("where to install the META files")
49 OCAMLFIND_META_DIR=`pwd`/METAS
50 AC_MSG_RESULT($OCAMLFIND_META_DIR)
51
52 AC_SUBST(OCAMLFIND)
53 AC_SUBST(OCAMLFIND_DEST_DIR)
54 AC_SUBST(OCAMLFIND_META_DIR)
55
56 AC_OUTPUT([
57   Makefile
58   Makefile.common
59 ])
60