]> matita.cs.unibo.it Git - helm.git/blob - helm/interface/configure.in
0.0.2
[helm.git] / helm / interface / configure.in
1 AC_INIT(configuration.ml.in)
2
3 PACKAGE=helm_gtk_interface
4 MAJOR_VERSION=0
5 MINOR_VERSION=0
6 MICRO_VERSION=2
7 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
8
9 if test "x$prefix" != xNONE; then
10   RESOLVED_PREFIX=$prefix
11 else
12   RESOLVED_PREFIX=$ac_default_prefix
13 fi
14
15 if test "x$exec_prefix" != xNONE; then
16   RESOLVED_EXEC_PREFIX=$exec_prefix
17 else
18   RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
19 fi
20
21 dnl The following is the directory where the binary will be installed
22 BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
23
24 dnl MISSING CHECKS:
25 dnl ocaml, ocaml-findlib, ocaml-netstring, ocaml-pxp, lablgtk_20001129
26 dnl lablgtk-20001129_gtkmathview
27
28 dnl Check for Ocaml
29 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
30 if test $HAVE_OCAMLC = "no"; then
31   AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
32 fi
33
34 dnl Check for the Ocaml library dir
35 AC_MSG_CHECKING("for the ocaml library dir")
36 OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
37 AC_MSG_RESULT($OCAML_ROOT)
38
39 dnl Check for mlminidom
40 AC_CHECK_FILE($OCAML_ROOT/mlminidom/minidom.mli,
41   RES="yes"
42   MLMINIDOM_LIB_DIR=$OCAML_ROOT/mlminidom,
43   RES="no"
44 )
45
46 if test $RES = "no"; then
47   echo
48   echo "It seems that mlminidom isn't installed in the default directory"
49   echo "$OCAML_ROOT/mlminidom. Where can I find it?"
50   echo
51   AC_CACHE_VAL(mmlinterface_cv_MLMINIDOM_LIB_DIR,
52     read mmlinterface_cv_MLMINIDOM_LIB_DIR
53   )
54   MLMINIDOM_LIB_DIR=$mmlinterface_cv_MLMINIDOM_LIB_DIR
55 fi
56
57 dnl Check for lablgtk
58 AC_CHECK_FILE($OCAML_ROOT/lablgtk/gtk.ml,
59   RES="yes"
60   LABLGTK_LIB_DIR=$OCAML_ROOT/lablgtk,
61   RES="no"
62 )
63
64 if test $RES = "no"; then
65   echo
66   echo "It seems that lablgtk isn't installed in the default directory"
67   echo "$OCAML_ROOT/lablgtk. Where can I find it?"
68   echo
69   AC_CACHE_VAL(mmlinterface_cv_LABLGTK_LIB_DIR,
70     read mmlinterface_cv_LABLGTK_LIB_DIR
71   )
72   LABLGTK_LIB_DIR=$mmlinterface_cv_LABLGTK_LIB_DIR
73 fi
74
75 dnl Check for lablgtkmathview
76 AC_CHECK_FILE($OCAML_ROOT/lablgtkmathview/gtkMathView.ml,
77   RES="yes"
78   LABLGTKMATHVIEW_LIB_DIR=$OCAML_ROOT/lablgtkmathview,
79   RES="no"
80 )
81
82 if test $RES = "no"; then
83   echo
84   echo "It seems that lablgtkmathview isn't installed in the default directory"
85   echo "$OCAML_ROOT/lablgtkmathview. Where can I find it?"
86   echo
87   AC_CACHE_VAL(mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR,
88     read mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
89   )
90   LABLGTKMATHVIEW_LIB_DIR=$mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
91 fi
92
93 dnl Check for HELM
94 AC_CHECK_PROG(HAVE_HELM_CONFIG, helm-config, yes, no)
95 if test $HAVE_HELM_CONFIG = "no"; then
96   AC_MSG_ERROR(Could not find helm-config)
97 fi
98
99 HELM_DEFAULT_CONFIGURATION_DIR=`helm-config --etc-dir`
100
101 AC_SUBST(PACKAGE)
102 AC_SUBST(VERSION)
103 AC_SUBST(OCAML_ROOT)
104 AC_SUBST(MLMINIDOM_LIB_DIR)
105 AC_SUBST(LABLGTK_LIB_DIR)
106 AC_SUBST(LABLGTKMATHVIEW_LIB_DIR)
107 AC_SUBST(BIN_DIR)
108 AC_SUBST(HELM_DEFAULT_CONFIGURATION_DIR)
109 AC_SUBST(PERL_BINARY)
110
111 AC_OUTPUT([
112   Makefile
113   configuration.ml
114   helm_wget
115   helm_gtk_interface.spec
116 ],
117   chmod +x helm_wget
118 )