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