]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/configure.in
Modified Files:
[helm.git] / helm / DEVEL / lablgtkmathview / configure.in
1 AC_INIT(gMathView.ml)
2
3 PACKAGE=lablgtkmathview
4
5 LABLGTKMATHVIEW_MAJOR_VERSION=0
6 LABLGTKMATHVIEW_MINOR_VERSION=2
7 LABLGTKMATHVIEW_MICRO_VERSION=2
8 LABLGTKMATHVIEW_VERSION=$LABLGTKMATHVIEW_MAJOR_VERSION.$LABLGTKMATHVIEW_MINOR_VERSION.$LABLGTKMATHVIEW_MICRO_VERSION
9 VERSION=$LABLGTKMATHVIEW_VERSION
10
11 AC_SUBST(PACKAGE)
12 AC_SUBST(VERSION)
13
14 AC_CHECK_PROG(HAVE_GTKMATHVIEW, gtkmathview-config, yes, no)
15 if test $HAVE_GTKMATHVIEW = "no"; then
16   AC_MSG_ERROR(could not find gtkmathview configuration script, please make sure gtkmathview is installed)
17 fi
18
19 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
20 if test $HAVE_OCAMLC = "no"; then
21   AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
22 fi
23
24 AC_MSG_CHECKING(for the ocaml library dir)
25 OCAML_LIB_DIR=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
26 AC_MSG_RESULT($OCAML_LIB_DIR)
27
28 AC_CHECK_FILE($OCAML_LIB_DIR/lablgtk/gtk.ml,
29   RES="yes"
30   LABLGTK_LIB_DIR=$OCAML_LIB_DIR/lablgtk,
31   RES="no"
32 )
33
34 if test $RES = "no"; then
35   RES=""
36   AC_CACHE_VAL(lablgtkmathview_cv_LABLGTK_LIB_DIR,
37     echo "In which directory can I find the lablgtk library? (I haven't found it in the usual location $OCAML_LIB_DIR/lablgtk)"
38     read lablgtkmathview_cv_LABLGTK_LIB_DIR
39     RES="Asked"
40   )
41   LABLGTK_LIB_DIR=$lablgtkmathview_cv_LABLGTK_LIB_DIR
42   if test "$RES" != "Asked"; then
43     LABLGTK_LIB_DIR=`eval "echo $LABLGTK_LIB_DIR"`
44   fi
45   AC_CACHE_SAVE
46 fi
47
48 AC_CHECK_FILE($OCAML_LIB_DIR/mlminidom/minidom.mli,
49   RES="yes"
50   MLMINIDOM_LIB_DIR=$OCAML_LIB_DIR/mlminidom,
51   RES="no"
52 )
53
54 if test $RES = "no"; then
55   RES=""
56   AC_CACHE_VAL(lablgtkmathview_cv_MLMINIDOM_LIB_DIR,
57     echo "In which directory can I find the mlminidom library? (I haven't found it in the usual location $OCAML_LIB_DIR/mlminidom)"
58     read lablgtkmathview_cv_MLMINIDOM_LIB_DIR
59     RES="Asked"
60   )
61   MLMINIDOM_LIB_DIR=$lablgtkmathview_cv_MLMINIDOM_LIB_DIR
62   if test "$RES" != "Asked"; then
63     MLMINIDOM_LIB_DIR=`eval "echo $MLMINIDOM_LIB_DIR"`
64   fi
65   AC_CACHE_SAVE
66 fi
67
68 AC_SUBST(LABLGTKMATHVIEW_VERSION)
69 AC_SUBST(OCAML_LIB_DIR)
70 AC_SUBST(LABLGTK_LIB_DIR)
71 AC_SUBST(MLMINIDOM_LIB_DIR)
72
73 AC_OUTPUT([
74   Makefile
75   lablgtkmathview.spec
76 ])