]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtkmathview/configure.in
This commit was manufactured by cvs2svn to create branch 'start'.
[helm.git] / helm / DEVEL / lablgtkmathview / configure.in
diff --git a/helm/DEVEL/lablgtkmathview/configure.in b/helm/DEVEL/lablgtkmathview/configure.in
new file mode 100644 (file)
index 0000000..c1403ad
--- /dev/null
@@ -0,0 +1,67 @@
+AC_INIT(gMathView.ml)
+
+LABLGTKMATHVIEW_MAJOR_VERSION=0
+LABLGTKMATHVIEW_MINOR_VERSION=2
+LABLGTKMATHVIEW_MICRO_VERSION=2
+LABLGTKMATHVIEW_VERSION=$LABLGTKMATHVIEW_MAJOR_VERSION.$LABLGTKMATHVIEW_MINOR_VERSION.$LABLGTKMATHVIEW_MICRO_VERSION
+
+AC_CHECK_PROG(HAVE_GTKMATHVIEW, gtkmathview-config, yes, no)
+if test $HAVE_GTKMATHVIEW = "no"; then
+  AC_MSG_ERROR(could not find gtkmathview configuration script, please make sure gtkmathview is installed)
+fi
+
+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
+
+AC_MSG_CHECKING(for the ocaml library dir)
+OCAML_ROOT=`ocamlc -v | grep "^Standard" | sed 's/^.*: *//'`
+AC_MSG_RESULT($OCAML_ROOT)
+
+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(lablgtkmathview_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 lablgtkmathview_cv_LABLGTK_LIB_DIR
+    RES="Asked"
+  )
+  LABLGTK_LIB_DIR=$lablgtkmathview_cv_LABLGTK_LIB_DIR
+  if test "$RES" != "Asked"; then
+    LABLGTK_LIB_DIR=`eval "echo $LABLGTK_LIB_DIR"`
+  fi
+  AC_CACHE_SAVE
+fi
+
+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
+
+AC_SUBST(LABLGTKMATHVIEW_VERSION)
+AC_SUBST(OCAML_ROOT)
+AC_SUBST(LABLGTK_LIB_DIR)
+AC_SUBST(MLMINIDOM_LIB_DIR)
+
+AC_OUTPUT([Makefile])