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