1 AC_INIT(matita/matitaTypes.ml)
3 # Distribution settings
4 # (i.e. settings (automatically) manipulated before a release)
6 DEFAULT_DBHOST="mysql://mowgli.cs.unibo.it"
7 RT_BASE_DIR_DEFAULT="`pwd`/matita"
8 MATITA_VERSION="0.99.3"
9 DISTRIBUTED="yes" # "yes" for distributed tarballs
10 # End of distribution settings
13 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
14 if test $HAVE_OCAMLC = "no"; then
15 AC_MSG_ERROR(could not find ocamlc)
17 AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
18 if test $HAVE_OCAMLOPT = "no"; then
19 AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
21 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
22 if test $HAVE_OCAMLFIND = "yes"; then
25 AC_MSG_ERROR(could not find ocamlfind)
27 AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc, yes, no)
28 if test $HAVE_LABLGLADECC = "yes"; then
29 LABLGLADECC="lablgladecc"
31 AC_MSG_ERROR(could not find lablgladecc)
33 AC_CHECK_PROG(HAVE_CAMLP5O, camlp5o, yes, no)
34 if test $HAVE_CAMLP5O = "yes"; then
37 AC_MSG_ERROR(could not find camlp5o)
42 LIBSPATH="`pwd`/components"
43 OCAMLPATHL="$LIBSPATH/METAS"
44 OCAMLPATH="$OCAMLPATHL:$OCAMLPATH"
48 echo -n "creating METAs ... "
49 for f in $OCAMLPATHL/meta.*.src; do
50 basename=`basename $f`
51 metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'`
52 dirname=`echo $metaname | sed 's/^helm-//'`
53 metafile="$OCAMLPATHL/META.$metaname"
55 echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile
59 # (libs) findlib requisites
63 FINDLIB_LIBSREQUIRES="\
67 lablgtk3.sourceview3 \
73 # (Matita) findlib requisites
76 FINDLIB_COMREQUIRES="\
80 helm-ng_disambiguation \
84 helm-ng_paramodulation \
88 $FINDLIB_COMREQUIRES \
92 lablgtk3.sourceview3 \
95 for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES
97 AC_MSG_CHECKING(for $r ocaml library)
98 if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then
101 AC_MSG_ERROR(could not find $r ocaml library)
105 OCAMLFIND_COMMANDS=""
106 # AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
107 # if test $HAVE_OCAMLC_OPT = "yes"; then
108 # if test "$OCAMLFIND_COMMANDS" = ""; then
109 # OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
111 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
114 # AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
115 # if test $HAVE_OCAMLOPT_OPT = "yes"; then
116 # if test "$OCAMLFIND_COMMANDS" = ""; then
117 # OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
119 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
122 if test "$OCAMLFIND_COMMANDS" != ""; then
123 OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
126 AC_MSG_CHECKING(--enable-debug argument)
128 [ --enable-debug Turn on debugging],
130 case "${enableval}" in
133 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
135 [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
137 if test "$DEBUG" = "true"; then
138 MSG="$MSG, debugging enabled."
140 MSG="$MSG, debugging disabled."
144 AC_MSG_CHECKING(--enable-annot argument)
146 [ --enable-annot Turn on -dtypes compilation option],
148 case "${enableval}" in
151 *) AC_MSG_ERROR(bad value ${enableval} for --enable-annot) ;;
153 [GIVEN="no"; ANNOT="false"])
155 if test "$ANNOT" = "true"; then
156 MSG="$MSG, type annotation enabled."
158 MSG="$MSG, type annotation disabled."
163 AC_MSG_CHECKING(--with-runtime-dir argument)
164 AC_ARG_WITH(runtime-dir,
165 [ --with-runtime-dir Runtime directory (current working directory if not given)],
166 [ RT_BASE_DIR="${withval}" ],
167 [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
169 if test "yes" = "$RT_BASE_DIR"; then
172 ** empty --with-runtime-dir argument, please use --with-runtime-dir=value **"
176 AC_MSG_CHECKING(--with-dbhost argument)
178 [ --with-dbhost SQL database hostname],
179 [ DBHOST="${withval}" ],
180 [ DBHOST="$DEFAULT_DBHOST" ])
182 if test "yes" = "$DBHOST"; then
185 ** empty --with-dbhost argument, please use --with-dbhost=value **"
193 AC_SUBST(DISTRIBUTED)
194 AC_SUBST(FINDLIB_CREQUIRES)
195 AC_SUBST(FINDLIB_REQUIRES)
196 AC_SUBST(HAVE_OCAMLOPT)
197 AC_SUBST(LABLGLADECC)
198 AC_SUBST(MATITA_VERSION)
201 AC_SUBST(RT_BASE_DIR)
203 AC_SUBST(TRANSFORMER_MODULE)
206 components/extlib/componentsConf.ml
207 matita/matita.conf.xml
208 matita/buildTimeConf.ml
209 matita/help/C/version.txt