1 AC_INIT(configuration.ml.in)
3 if test "x$prefix" != xNONE; then
4 RESOLVED_PREFIX=$prefix
6 RESOLVED_PREFIX=$ac_default_prefix
9 if test "x$exec_prefix" != xNONE; then
10 RESOLVED_EXEC_PREFIX=$exec_prefix
12 RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
17 dnl ocaml, ocaml-findlib, ocaml-netstring, ocaml-pxp, lablgtk_20001129
18 dnl lablgtk-20001129_gtkmathview
21 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
22 if test $HAVE_OCAMLC = "no"; then
23 AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
26 dnl Check for the Ocaml library dir
27 AC_MSG_CHECKING("for the ocaml library dir")
28 OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
29 AC_MSG_RESULT($OCAML_ROOT)
31 dnl Check for mlminidom
33 AC_CHECK_FILE($OCAML_ROOT/mlminidom/minidom.mli,
34 MLMINIDOM_LIB_DIR=$OCAML_ROOT/mlminidom,
38 if test $RES = "no"; then
40 AC_CACHE_VAL(lablgtkmathview_cv_MLMINIDOM_LIB_DIR,
41 echo "In which directory can I find the mlminidom library? (I haven't found it in the usual location $OCAML_ROOT/mlminidom)"
42 read lablgtkmathview_cv_MLMINIDOM_LIB_DIR
45 MLMINIDOM_LIB_DIR=$lablgtkmathview_cv_MLMINIDOM_LIB_DIR
46 if test "$RES" != "Asked"; then
47 MLMINIDOM_LIB_DIR=`eval "echo $MLMINIDOM_LIB_DIR"`
54 AC_CHECK_FILE($OCAML_ROOT/lablgtk/gtk.ml,
55 LABLGTK_LIB_DIR=$OCAML_ROOT/lablgtk,
59 if test $RES = "no"; then
61 AC_CACHE_VAL(mmlinterface_cv_LABLGTK_LIB_DIR,
62 echo "In which directory can I find the lablgtk library? (I haven't found it in the usual location $OCAML_ROOT/lablgtk)"
63 read mmlinterface_cv_LABLGTK_LIB_DIR
66 LABLGTK_LIB_DIR=$mmlinterface_cv_LABLGTK_LIB_DIR
67 if test "$RES" != "Asked"; then
68 LABLGTK_LIB_DIR=`eval "echo $LABLGTK_LIB_DIR"`
73 dnl Check for lablgtkmathview
75 AC_CHECK_FILE($OCAML_ROOT/lablgtkmathview/gtkMathView.ml,
76 LABLGTKMATHVIEW_LIB_DIR=$OCAML_ROOT/lablgtkmathview,
80 if test $RES = "no"; then
82 AC_CACHE_VAL(mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR,
83 echo "In which directory can I find the lablgtkmathview library? (I haven't found it in the usual location $OCAML_ROOT/lablgtkmathview)"
84 read mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
87 LABLGTKMATHVIEW_LIB_DIR=$mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
88 if test "$RES" != "Asked"; then
89 LABLGTKMATHVIEW_LIB_DIR=`eval "echo $LABLGTKMATHVIEW_LIB_DIR"`
94 AC_MSG_CHECKING("for the bin dir")
95 HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
96 AC_MSG_RESULT($HELM_BIN_DIR)
98 AC_MSG_CHECKING("for the helm configuration dir")
100 AC_CACHE_VAL(helm_cv_HELM_DEFAULT_CONFIGURATION_DIR,
101 echo "In which directory can I find configuration.xml (part of the helm_configuration package)?"
102 read helm_cv_HELM_DEFAULT_CONFIGURATION_DIR
105 HELM_DEFAULT_CONFIGURATION_DIR=$helm_cv_HELM_DEFAULT_CONFIGURATION_DIR
106 if test "$RES" != "Asked" ; then
107 HELM_DEFAULT_CONFIGURATION_DIR=`eval "echo $HELM_DEFAULT_CONFIGURATION_DIR"`
108 AC_MSG_RESULT($HELM_DEFAULT_CONFIGURATION_DIR)
112 AC_PATH_PROG(PERL_BINARY,perl,no)
113 if test $PERL_BINARY = no ; then
114 AC_MSG_ERROR(Could not find perl)
118 AC_SUBST(MLMINIDOM_LIB_DIR)
119 AC_SUBST(LABLGTK_LIB_DIR)
120 AC_SUBST(LABLGTKMATHVIEW_LIB_DIR)
121 AC_SUBST(HELM_BIN_DIR)
122 AC_SUBST(HELM_DEFAULT_CONFIGURATION_DIR)
123 AC_SUBST(PERL_BINARY)
125 AC_OUTPUT([Makefile configuration.ml helm_wget], chmod +x helm_wget)