1 AC_INIT(matita/matitaTypes.ml)
3 # Distribution settings (i.e. settings to be manipulated before a release)
5 RT_BASE_DIR_DEFAULT="`pwd`/matita"
7 # End of distribution settings
9 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
10 if test $HAVE_OCAMLC = "no"; then
11 AC_MSG_ERROR(could not find ocamlc)
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)
17 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
18 if test $HAVE_OCAMLFIND = "yes"; then
21 AC_MSG_ERROR(could not find ocamlfind)
23 AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
24 if test $HAVE_LABLGLADECC = "yes"; then
25 LABLGLADECC="lablgladecc2"
27 AC_MSG_ERROR(could not find lablgladecc2)
29 AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
30 if test $HAVE_CAMLP4O = "yes"; then
33 AC_MSG_ERROR(could not find camlp4o)
40 if test -d libs ; then
41 OCAMLPATH=`pwd`/libs/METAS
44 if test -d ocaml ; then
45 OCAMLPATH=`pwd`/ocaml/METAS
48 if test -z $OCAMLPATH; then
49 AC_MSG_ERROR(could not find METAS directory)
54 echo -n "creating METAs ... "
55 for f in $OCAMLPATH/meta.*.src; do
56 basename=`basename $f`
57 metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'`
58 dirname=`echo $metaname | sed 's/^helm-//'`
59 metafile="$OCAMLPATH/META.$metaname"
61 echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile
65 # (libs) findlib requisites
67 FINDLIB_LIBSREQUIRES="\
80 # (Matita) findlib requisites
82 FINDLIB_COMREQUIRES="\
83 helm-cic_disambiguation \
91 $FINDLIB_COMREQUIRES \
100 for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES
102 AC_MSG_CHECKING(for $r ocaml library)
103 if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then
106 AC_MSG_ERROR(could not find $r ocaml library)
110 OCAMLFIND_COMMANDS=""
111 # AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
112 # if test $HAVE_OCAMLC_OPT = "yes"; then
113 # if test "$OCAMLFIND_COMMANDS" = ""; then
114 # OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
116 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
119 # AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
120 # if test $HAVE_OCAMLOPT_OPT = "yes"; then
121 # if test "$OCAMLFIND_COMMANDS" = ""; then
122 # OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
124 # OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
127 if test "$OCAMLFIND_COMMANDS" != ""; then
128 OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
131 AC_MSG_CHECKING(--enable-debug argument)
133 [ --enable-debug Turn on debugging],
135 case "${enableval}" in
138 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
140 [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
142 if test "$DEBUG" = "true"; then
143 MSG="$MSG, debugging enabled."
145 MSG="$MSG, debugging disabled."
149 AC_MSG_CHECKING(--with-runtime-dir argument)
150 AC_ARG_WITH(runtime-dir,
151 [ --with-runtime-dir Runtime directory (current working directory if not given)],
152 [ RT_BASE_DIR="${withval}" ],
153 [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
154 AC_MSG_RESULT($RT_BASE_DIR)
158 AC_SUBST(TRANSFORMER_MODULE)
159 AC_SUBST(FINDLIB_REQUIRES)
160 AC_SUBST(FINDLIB_CREQUIRES)
161 AC_SUBST(HAVE_OCAMLOPT)
162 AC_SUBST(LABLGLADECC)
165 AC_SUBST(RT_BASE_DIR)
166 AC_SUBST(MATITA_VERSION)
169 matita/matita.conf.xml.sample
170 matita/buildTimeConf.ml
171 matita/gtkmathview.matita.conf.xml