RESOLVED_EXEC_PREFIX=$RESOLVED_PREFIX
fi
-dnl General
+
+dnl MISSING CHECKS:
+dnl ocaml, ocaml-findlib, ocaml-netstring, ocaml-pxp, lablgtk_20001129
+dnl lablgtk-20001129_gtkmathview
+
+dnl Check for Ocaml
+AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
+if test $HAVE_OCAMLC = "no"; then
+ AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
+fi
+
+dnl Check for the Ocaml library dir
AC_MSG_CHECKING("for the ocaml library dir")
OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
AC_MSG_RESULT($OCAML_ROOT)
+dnl Check for mlminidom
+RES="yes"
+AC_CHECK_FILE($OCAML_ROOT/mlminidom/minidom.mli,
+ MLMINIDOM_LIB_DIR=$OCAML_ROOT/mlminidom,
+ RES="no"
+)
+
+if test $RES = "no"; then
+ RES=""
+ AC_CACHE_VAL(lablgtkmathview_cv_MLMINIDOM_LIB_DIR,
+ echo "In which directory can I find the mlminidom library? (I haven't found it in the usual location $OCAML_ROOT/mlminidom)"
+ read lablgtkmathview_cv_MLMINIDOM_LIB_DIR
+ RES="Asked"
+ )
+ MLMINIDOM_LIB_DIR=$lablgtkmathview_cv_MLMINIDOM_LIB_DIR
+ if test "$RES" != "Asked"; then
+ MLMINIDOM_LIB_DIR=`eval "echo $MLMINIDOM_LIB_DIR"`
+ fi
+ AC_CACHE_SAVE
+fi
+
+dnl Check for lablgtk
+RES="yes"
+AC_CHECK_FILE($OCAML_ROOT/lablgtk/gtk.ml,
+ LABLGTK_LIB_DIR=$OCAML_ROOT/lablgtk,
+ RES="no"
+)
+
+if test $RES = "no"; then
+ RES=""
+ AC_CACHE_VAL(mmlinterface_cv_LABLGTK_LIB_DIR,
+ echo "In which directory can I find the lablgtk library? (I haven't found it in the usual location $OCAML_ROOT/lablgtk)"
+ read mmlinterface_cv_LABLGTK_LIB_DIR
+ RES="Asked"
+ )
+ LABLGTK_LIB_DIR=$mmlinterface_cv_LABLGTK_LIB_DIR
+ if test "$RES" != "Asked"; then
+ LABLGTK_LIB_DIR=`eval "echo $LABLGTK_LIB_DIR"`
+ fi
+ AC_CACHE_SAVE
+fi
+
+dnl Check for lablgtkmathview
+RES="yes"
+AC_CHECK_FILE($OCAML_ROOT/lablgtkmathview/gtkMathView.ml,
+ LABLGTKMATHVIEW_LIB_DIR=$OCAML_ROOT/lablgtkmathview,
+ RES="no"
+)
+
+if test $RES = "no"; then
+ RES=""
+ AC_CACHE_VAL(mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR,
+ echo "In which directory can I find the lablgtkmathview library? (I haven't found it in the usual location $OCAML_ROOT/lablgtkmathview)"
+ read mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
+ RES="Asked"
+ )
+ LABLGTKMATHVIEW_LIB_DIR=$mmlinterface_cv_LABLGTKMATHVIEW_LIB_DIR
+ if test "$RES" != "Asked"; then
+ LABLGTKMATHVIEW_LIB_DIR=`eval "echo $LABLGTKMATHVIEW_LIB_DIR"`
+ fi
+ AC_CACHE_SAVE
+fi
+
AC_MSG_CHECKING("for the bin dir")
HELM_BIN_DIR=$RESOLVED_EXEC_PREFIX/bin
AC_MSG_RESULT($HELM_BIN_DIR)
fi
AC_SUBST(OCAML_ROOT)
+AC_SUBST(MLMINIDOM_LIB_DIR)
+AC_SUBST(LABLGTK_LIB_DIR)
+AC_SUBST(LABLGTKMATHVIEW_LIB_DIR)
AC_SUBST(HELM_BIN_DIR)
AC_SUBST(HELM_DEFAULT_CONFIGURATION_DIR)
AC_SUBST(PERL_BINARY)
-AC_OUTPUT([Makefile configuration.ml helm_wget])
+AC_OUTPUT([Makefile configuration.ml helm_wget], chmod +x helm_wget)