]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/configure.ac
checked in new version of matita from svn
[helm.git] / helm / matita / configure.ac
1 AC_INIT(matitaTypes.ml)
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)
6 fi
7 AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
8 if test $HAVE_OCAMLOPT = "no"; then
9   AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
10 fi
11 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
12 if test $HAVE_OCAMLFIND = "yes"; then
13   OCAMLFIND="ocamlfind"
14 else
15   AC_MSG_ERROR(could not find ocamlfind)
16 fi
17 AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
18 if test $HAVE_LABLGLADECC = "yes"; then
19   LABLGLADECC="lablgladecc2"
20 else
21   AC_MSG_ERROR(could not find lablgladecc2)
22 fi
23 AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
24 if test $HAVE_CAMLP4O = "yes"; then
25   CAMLP4O="camlp4o"
26 else
27   AC_MSG_ERROR(could not find camlp4o)
28 fi
29
30 FINDLIB_CREQUIRES="\
31 pcre \
32 mysql \
33 unix \
34 helm-cic_omdoc \
35 helm-cic_transformations \
36 helm-registry \
37 helm-tactics \
38 helm-xml \
39 helm-cic_textual_parser2 \
40 "
41 FINDLIB_REQUIRES="\
42 $FINDLIB_CREQUIRES \
43 lablgtk2.glade \
44 lablgtkmathview \
45 helm-xmldiff \
46 "
47 for r in $FINDLIB_REQUIRES
48 do
49   AC_MSG_CHECKING(for $r ocaml library)
50   if $OCAMLFIND query $r &> /dev/null; then
51     AC_MSG_RESULT(yes)
52   else
53     AC_MSG_ERROR(could not find $r ocaml library)
54   fi
55 done
56
57 OCAMLFIND_COMMANDS=""
58 AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
59 if test $HAVE_OCAMLC_OPT = "yes"; then
60   if test "$OCAMLFIND_COMMANDS" = ""; then
61     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
62   else
63     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
64   fi
65 fi
66 AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
67 if test $HAVE_OCAMLOPT_OPT = "yes"; then
68   if test "$OCAMLFIND_COMMANDS" = ""; then
69     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
70   else
71     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
72   fi
73 fi
74 if test "$OCAMLFIND_COMMANDS" != ""; then
75   OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
76 fi
77 AC_ARG_ENABLE(debug,
78   [  --enable-debug    Turn on debugging],
79   [case "${enableval}" in
80    yes) DEBUG=true ;;
81    no)  DEBUG=false ;;
82    *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
83   esac],
84   [DEBUG=true])
85 if test "$DEBUG" = "true"; then
86   echo "debugging enabled"
87 fi
88
89 MATITA_GTKRC="matita.gtkrc"
90
91 AC_SUBST(CAMLP4O)
92 AC_SUBST(DEBUG)
93 AC_SUBST(TRANSFORMER_MODULE)
94 AC_SUBST(FINDLIB_REQUIRES)
95 AC_SUBST(FINDLIB_CREQUIRES)
96 AC_SUBST(HAVE_OCAMLOPT)
97 AC_SUBST(LABLGLADECC)
98 AC_SUBST(OCAMLFIND)
99 AC_SUBST(MATITA_GTKRC)
100
101 AC_OUTPUT([
102   buildTimeConf.ml
103   Makefile
104 ])