1 AC_INIT(matita/matitaTypes.ml)
3 # Distribution settings (i.e. settings to be manipulated before a release)
5 DEFAULT_DBHOST="mowgli.cs.unibo.it"
6 RT_BASE_DIR_DEFAULT="`pwd`/matita"
8 # End of distribution settings
10 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
11 if test $HAVE_OCAMLC = "no"; then
12 AC_MSG_ERROR(could not find ocamlc)
14 AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
15 if test $HAVE_OCAMLOPT = "no"; then
16 AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
18 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
19 if test $HAVE_OCAMLFIND = "yes"; then
22 AC_MSG_ERROR(could not find ocamlfind)
24 AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
25 if test $HAVE_LABLGLADECC = "yes"; then
26 LABLGLADECC="lablgladecc2"
28 AC_MSG_ERROR(could not find lablgladecc2)
30 AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
31 if test $HAVE_CAMLP4O = "yes"; then
34 AC_MSG_ERROR(could not find camlp4o)
39 LIBSPATH="`pwd`/components"
40 OCAMLPATH="$LIBSPATH/METAS"
44 echo -n "creating METAs ... "
45 for f in $OCAMLPATH/meta.*.src; do
46 basename=`basename $f`
47 metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'`
48 dirname=`echo $metaname | sed 's/^helm-//'`
49 metafile="$OCAMLPATH/META.$metaname"
51 echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile
55 # (libs) findlib requisites
57 FINDLIB_LIBSREQUIRES="\
70 # (Matita) findlib requisites
72 FINDLIB_COMREQUIRES="\
73 helm-cic_disambiguation \
81 $FINDLIB_COMREQUIRES \
90 for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES
92 AC_MSG_CHECKING(for $r ocaml library)
93 if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then
96 AC_MSG_ERROR(could not find $r ocaml library)
100 OCAMLFIND_COMMANDS=""
101 # AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
102 # if test $HAVE_OCAMLC_OPT = "yes"; then
103 # if test "$OCAMLFIND_COMMANDS" = ""; then
104 # OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
106 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
109 # AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
110 # if test $HAVE_OCAMLOPT_OPT = "yes"; then
111 # if test "$OCAMLFIND_COMMANDS" = ""; then
112 # OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
114 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
117 if test "$OCAMLFIND_COMMANDS" != ""; then
118 OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
121 AC_MSG_CHECKING(--enable-debug argument)
123 [ --enable-debug Turn on debugging],
125 case "${enableval}" in
128 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
130 [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
132 if test "$DEBUG" = "true"; then
133 MSG="$MSG, debugging enabled."
135 MSG="$MSG, debugging disabled."
139 AC_MSG_CHECKING(--with-runtime-dir argument)
140 AC_ARG_WITH(runtime-dir,
141 [ --with-runtime-dir Runtime directory (current working directory if not given)],
142 [ RT_BASE_DIR="${withval}" ],
143 [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
144 AC_MSG_RESULT($RT_BASE_DIR)
146 AC_MSG_CHECKING(--with-dbhost argument)
148 [ --with-dbhost SQL database hostname],
149 [ DBHOST="${withval}" ],
150 [ DBHOST="$DEFAULT_DBHOST" ])
151 AC_MSG_RESULT($DBHOST)
156 AC_SUBST(TRANSFORMER_MODULE)
157 AC_SUBST(FINDLIB_REQUIRES)
158 AC_SUBST(FINDLIB_CREQUIRES)
159 AC_SUBST(HAVE_OCAMLOPT)
160 AC_SUBST(LABLGLADECC)
163 AC_SUBST(RT_BASE_DIR)
164 AC_SUBST(MATITA_VERSION)
167 components/extlib/componentsConf.ml
168 matita/matita.conf.xml.devel
169 matita/matita.conf.xml.user
170 matita/matita.conf.xml.build
171 matita/buildTimeConf.ml
172 matita/gtkmathview.matita.conf.xml