]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/configure.ac
Unsharing finally introduced (but just for object processing, not yet for terms
[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 FINDLIB_DEPREQUIRES="\
30 pcre \
31 mysql \
32 helm-registry \
33 helm-cic_textual_parser2 \
34 "
35 FINDLIB_CLEANREQUIRES="$FINDLIB_DEPREQUIRES"
36 FINDLIB_CREQUIRES="\
37 $FINDLIB_CLEANREQUIRES \
38 unix \
39 helm-cic_omdoc \
40 helm-tactics \
41 helm-paramodulation \
42 helm-xml \
43 "
44 FINDLIB_REQUIRES="\
45 $FINDLIB_CREQUIRES \
46 lablgtk2.glade \
47 lablgtkmathview \
48 lablgtksourceview \
49 helm-xmldiff \
50 "
51 for r in $FINDLIB_REQUIRES
52 do
53   AC_MSG_CHECKING(for $r ocaml library)
54   if OCAMLPATH=../ocaml/METAS $OCAMLFIND query $r &> /dev/null; then
55     AC_MSG_RESULT(yes)
56   else
57     AC_MSG_ERROR(could not find $r ocaml library)
58   fi
59 done
60
61 OCAMLFIND_COMMANDS=""
62 AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
63 if test $HAVE_OCAMLC_OPT = "yes"; then
64   if test "$OCAMLFIND_COMMANDS" = ""; then
65     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
66   else
67     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
68   fi
69 fi
70 AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
71 if test $HAVE_OCAMLOPT_OPT = "yes"; then
72   if test "$OCAMLFIND_COMMANDS" = ""; then
73     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
74   else
75     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
76   fi
77 fi
78 if test "$OCAMLFIND_COMMANDS" != ""; then
79   OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
80 fi
81 AC_ARG_ENABLE(debug,
82   [  --enable-debug    Turn on debugging],
83   [case "${enableval}" in
84    yes) DEBUG=true ;;
85    no)  DEBUG=false ;;
86    *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
87   esac],
88   [DEBUG=true])
89 if test "$DEBUG" = "true"; then
90   echo "debugging enabled"
91 fi
92
93 RT_BASE_DIR=`pwd`
94 USER_HOME=`pwd` #should be `echo $HOME`
95 USER_NAME=`echo $USER`
96
97 AC_SUBST(CAMLP4O)
98 AC_SUBST(DEBUG)
99 AC_SUBST(TRANSFORMER_MODULE)
100 AC_SUBST(FINDLIB_REQUIRES)
101 AC_SUBST(FINDLIB_CREQUIRES)
102 AC_SUBST(FINDLIB_DEPREQUIRES)
103 AC_SUBST(FINDLIB_CLEANREQUIRES)
104 AC_SUBST(HAVE_OCAMLOPT)
105 AC_SUBST(LABLGLADECC)
106 AC_SUBST(OCAMLFIND)
107 AC_SUBST(RT_BASE_DIR)
108 AC_SUBST(USER_HOME)
109 AC_SUBST(USER_NAME)
110
111 AC_OUTPUT([
112   matita.conf.xml.sample
113   buildTimeConf.ml
114   Makefile
115   gtkmathview.matita.conf.xml
116 ])