]> matita.cs.unibo.it Git - helm.git/commitdiff
Makefile.in: improved support for autoconf
authorLuca Padovani <luca.padovani@unito.it>
Wed, 10 Jan 2001 11:00:53 +0000 (11:00 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Wed, 10 Jan 2001 11:00:53 +0000 (11:00 +0000)
configure.in: added checks for minidom, lablgtk, lablgtkmathview

helm/interface/Makefile.in
helm/interface/configure.in

index b31b68e616f3a7bc37069cd4de48edc5564703ba..fe2a0dc4517e4dc2ddcc199a8d329b48f4cd8322 100644 (file)
@@ -1,13 +1,16 @@
 OCAML_ROOT = @OCAML_ROOT@
 HELM_BIN_DIR = @HELM_BIN_DIR@
+LABLGTK_DIR = @LABLGTK_LIB_DIR@
+LABLGTKMATHVIEW_DIR = @LABLGTKMATHVIEW_LIB_DIR@
+MINIDOM_DIR = @MLMINIDOM_LIB_DIR@
 
-LABLGTK_DIR = $(OCAML_ROOT)/lablgtk
-LABLGTK_MATHVIEW_DIR = $(OCAML_ROOT)/lablgtk/mathview
-MINIDOM_DIR = $(OCAML_ROOT)/minidom
 PXP_DIR = $(OCAML_ROOT)/site-lib/pxp
 NETSTRING_DIR = $(OCAML_ROOT)/site-lib/netstring
-OCAMLC = ocamlc -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) -I mlmathview
-OCAMLOPT = ocamlopt -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) -I mlgtk_devel -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) -I mlmathview
+
+#OCAMLC = ocamlc -I $(LABLGTK_DIR) -I $(LABLGTKMATHVIEW_DIR) -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) -I mlmathview
+#OCAMLOPT = ocamlopt -I $(LABLGTK_DIR) -I $(LABLGTKMATHVIEW_DIR) -I mlgtk_devel -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) -I mlmathview
+OCAMLC = ocamlc -I $(LABLGTK_DIR) -I $(LABLGTKMATHVIEW_DIR) -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) 
+OCAMLOPT = ocamlopt -I $(LABLGTK_DIR) -I $(LABLGTKMATHVIEW_DIR) -I $(PXP_DIR) -I $(NETSTRING_DIR) -I $(MINIDOM_DIR) 
 OCAMLDEP = ocamldep
 
 all: experiment reduction fix_params mmlinterface
@@ -111,12 +114,12 @@ mmlinterface: $(MMLINTERFACEOBJS)
                   lablgtk.cma gtkInit.cmo \
                   $(MINIDOM_DIR)/minidom.cmo \
                   $(MINIDOM_DIR)/ominidom.cmo \
-                  $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cma \
+                  $(LABLGTKMATHVIEW_DIR)/lablgtkmathview.cma \
                   $(MMLINTERFACEOBJS) \
                   -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \
                   -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \
                   -lunix `gtkmathview-config --libs` \
-                  $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o \
+                  $(LABLGTKMATHVIEW_DIR)/ml_gtk_mathview.o \
                   $(MINIDOM_DIR)/ml_minidom.o" \
                   -cclib -lmldbm -cclib -lndbm
 
@@ -125,12 +128,12 @@ mmlinterface.opt: $(MMLINTERFACEOPTOBJS)
                     dbm.cmxa lablgtk.cmxa gtkInit.cmx \
                     $(MINIDOM_DIR)/minidom.cmx \
                     $(MINIDOM_DIR)/ominidom.cmx \
-                    $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cmxa \
+                    $(LABLGTKMATHVIEW_DIR)/lablgtkmathview.cmxa \
                     $(MMLINTERFACEOPTOBJS) \
                     -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \
                     -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \
                     -lunix `gtkmathview-config --libs` \
-                    $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o \
+                    $(LABLGTKMATHVIEW_DIR)/ml_gtk_mathview.o \
                     $(MINIDOM_DIR)/ml_minidom.o" \
                     -cclib -lmldbm -cclib -lndbm
 
index 469f365b1104caab5bb7236458d2bba5a4710dbe..43d571a2c87ef12263fdba8d3186b5ca8b659277 100644 (file)
@@ -17,11 +17,80 @@ dnl MISSING CHECKS:
 dnl ocaml, ocaml-findlib, ocaml-netstring, ocaml-pxp, lablgtk_20001129
 dnl lablgtk-20001129_gtkmathview
 
-dnl General
+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)
@@ -46,6 +115,9 @@ if test $PERL_BINARY = no ; then
 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)