]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/configure.ac
added missing dependency
[helm.git] / helm / matita / configure.ac
1 AC_INIT(matitaTypes.ml)
2
3 # Distribution settings (i.e. settings to be manipulated before a release)
4 DEBUG_DEFAULT="true"
5 RT_BASE_DIR_DEFAULT="`pwd`"
6 MATITA_VERSION="0.0.1"
7 # End of distribution settings
8
9 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
10 if test $HAVE_OCAMLC = "no"; then
11   AC_MSG_ERROR(could not find ocamlc)
12 fi
13 AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
14 if test $HAVE_OCAMLOPT = "no"; then
15   AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
16 fi
17 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
18 if test $HAVE_OCAMLFIND = "yes"; then
19   OCAMLFIND="ocamlfind"
20 else
21   AC_MSG_ERROR(could not find ocamlfind)
22 fi
23 AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
24 if test $HAVE_LABLGLADECC = "yes"; then
25   LABLGLADECC="lablgladecc2"
26 else
27   AC_MSG_ERROR(could not find lablgladecc2)
28 fi
29 AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
30 if test $HAVE_CAMLP4O = "yes"; then
31   CAMLP4O="camlp4o"
32 else
33   AC_MSG_ERROR(could not find camlp4o)
34 fi
35 FINDLIB_COMREQUIRES="\
36 pcre \
37 mysql \
38 helm-registry \
39 helm-extlib \
40 helm-hmysql \
41 helm-cic_notation \
42 helm-tactics \
43 helm-cic_disambiguation \
44 helm-cic_transformations \
45 "
46 FINDLIB_CLEANREQUIRES="$FINDLIB_COMREQUIRES"
47 FINDLIB_DEPREQUIRES="$FINDLIB_COMREQUIRES"
48 FINDLIB_MAKEREQUIRES=" \
49 helm-registry \
50 helm-extlib \
51 "
52 FINDLIB_CREQUIRES=" \
53 $FINDLIB_COMREQUIRES \
54 helm-paramodulation \
55 "
56 FINDLIB_REQUIRES="\
57 $FINDLIB_CREQUIRES \
58 lablgtk2.glade \
59 lablgtkmathview \
60 lablgtksourceview \
61 helm-xmldiff \
62 helm-cic_transformations \
63 helm-tactics \
64 helm-cic_disambiguation \
65 helm-paramodulation \
66 "
67 for r in $FINDLIB_REQUIRES
68 do
69   AC_MSG_CHECKING(for $r ocaml library)
70   if OCAMLPATH=../ocaml/METAS $OCAMLFIND query $r &> /dev/null; then
71     AC_MSG_RESULT(yes)
72   else
73     AC_MSG_ERROR(could not find $r ocaml library)
74   fi
75 done
76
77 OCAMLFIND_COMMANDS=""
78 # AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
79 # if test $HAVE_OCAMLC_OPT = "yes"; then
80 #   if test "$OCAMLFIND_COMMANDS" = ""; then
81 #     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
82 #   else
83 #     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
84 #   fi
85 # fi
86 # AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
87 # if test $HAVE_OCAMLOPT_OPT = "yes"; then
88 #   if test "$OCAMLFIND_COMMANDS" = ""; then
89 #     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
90 #   else
91 #     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
92 #   fi
93 # fi
94 if test "$OCAMLFIND_COMMANDS" != ""; then
95   OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
96 fi
97
98 AC_MSG_CHECKING(--enable-debug argument)
99 AC_ARG_ENABLE(debug,
100   [  --enable-debug     Turn on debugging],
101   [GIVEN="yes";
102    case "${enableval}" in
103    yes) DEBUG=true ;;
104    no)  DEBUG=false ;;
105    *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
106   esac],
107   [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
108 MSG=$GIVEN
109 if test "$DEBUG" = "true"; then
110   MSG="$MSG, debugging enabled."
111 else
112   MSG="$MSG, debugging disabled."
113 fi
114 AC_MSG_RESULT($MSG)
115
116 AC_MSG_CHECKING(--with-runtime-dir argument)
117 AC_ARG_WITH(runtime-dir,
118   [ --with-runtime-dir  Runtime directory (current working directory if not given)],
119   [ RT_BASE_DIR="${withval}" ],
120   [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
121 AC_MSG_RESULT($RT_BASE_DIR)
122
123 AC_SUBST(CAMLP4O)
124 AC_SUBST(DEBUG)
125 AC_SUBST(TRANSFORMER_MODULE)
126 AC_SUBST(FINDLIB_REQUIRES)
127 AC_SUBST(FINDLIB_CREQUIRES)
128 AC_SUBST(FINDLIB_DEPREQUIRES)
129 AC_SUBST(FINDLIB_CLEANREQUIRES)
130 AC_SUBST(FINDLIB_MAKEREQUIRES)
131 AC_SUBST(HAVE_OCAMLOPT)
132 AC_SUBST(LABLGLADECC)
133 AC_SUBST(OCAMLFIND)
134 AC_SUBST(RT_BASE_DIR)
135 AC_SUBST(MATITA_VERSION)
136
137 AC_OUTPUT([
138   matita.conf.xml.sample
139   buildTimeConf.ml
140   Makefile
141   gtkmathview.matita.conf.xml
142 ])