X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fconfigure.ac;h=be109d69c013a55db0db2074af5326291a9aff6f;hb=d8c267e189086278b039eaf0e39f4fa5d256facc;hp=0dca72c8cb5fec57e629218c746226b52332e5ec;hpb=89262281b6e83bd2321150f81f1a0583645eb0c8;p=helm.git diff --git a/helm/DEVEL/mathml_editor/configure.ac b/helm/DEVEL/mathml_editor/configure.ac index 0dca72c8c..be109d69c 100644 --- a/helm/DEVEL/mathml_editor/configure.ac +++ b/helm/DEVEL/mathml_editor/configure.ac @@ -72,6 +72,11 @@ AC_PROG_CXX AC_PROG_INSTALL AC_HEADER_STDC([]) +AC_LANG_PUSH(C++) +AC_CHECK_HEADERS(hash_map) +AC_CHECK_HEADERS(ext/hash_map) +AC_LANG_POP(C++) + AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) @@ -110,7 +115,7 @@ AC_SUBST(GMETADOM_CFLAGS) AC_SUBST(GMETADOM_LIBS) GDOMEXSLT_CONFIG="gdome_xslt_cpp_smart-config" -GDOMEXSLT_MIN_VERSION=0.0.1 +GDOMEXSLT_MIN_VERSION=0.0.4 AC_MSG_CHECKING([for gdome_xslt C++ library] >= $GDOMEXSLT_MIN_VERSION) if test "x$GDOMEXSLT_PREFIX" != "x" then @@ -171,10 +176,73 @@ fi AC_SUBST(GTKMATHVIEW_CFLAGS) AC_SUBST(GTKMATHVIEW_LIBS) +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]) +else + OCAMLC=ocamlc + OCAMLSTDLIBDIR="`ocamlc -where`" + OCAMLSTUBDIR="`ocamlc -where`/stublibs" + AC_SUBST(OCAMLC) + AC_SUBST(OCAMLSTDLIBDIR) + AC_SUBST(OCAMLSTUBDIR) +fi + +AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no) +if test $HAVE_OCAMLOPT = "no"; then + AC_MSG_WARN([ocaml native libraries won't be compiled since ocamlopt was not found]) +else + OCAMLOPT=ocamlopt + AC_SUBST(OCAMLOPT) +fi +AM_CONDITIONAL(HAVE_OCAMLOPT_COND, test x$HAVE_OCAMLOPT = xyes) + +AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no) +if test $HAVE_OCAMLFIND = "no"; then + AC_MSG_ERROR([could not find ocamlfind in PATH, please make sure findlib is installed]) +else + OCAMLFIND=ocamlfind + AC_SUBST(OCAMLFIND) +fi + +AC_CHECK_PROG(HAVE_OCAMLDEP, ocamldep, yes, no) +if test $HAVE_OCAMLDEP = "yes"; then + OCAMLDEP=ocamldep + AC_SUBST(OCAMLDEP) +fi + +AC_CHECK_PROG(HAVE_OCAMLMKLIB, ocamlmklib, yes, no) +if test $HAVE_OCAMLMKLIB = "no"; then + AC_MSG_ERROR([could not find ocamlmklib in PATH, please make sure ocamlmklib is installed]) +else + OCAMLMKLIB=ocamlmklib + AC_SUBST(OCAMLMKLIB) +fi + +AC_MSG_CHECKING(for gdome2 ocaml binding) +ocamlfind query gdome2 || + AC_MSG_ERROR(gdome2 not installed (according to findlib)) +MLGDOME_CFLAGS="`$OCAMLFIND query -i-format gdome2`" +AC_SUBST(MLGDOME_CFLAGS) + +AC_MSG_CHECKING(for the ocaml library dir) +OCAML_LIB_DIR=`ocamlc -where` +AC_MSG_RESULT($OCAML_LIB_DIR) + +AC_CHECK_FILE(/usr/include/caml/mlvalues.h, + OCAML_INCLUDE_DIR=/usr/include/caml, + OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml +) + +AC_SUBST(OCAML_INCLUDE_DIR) + AC_CONFIG_FILES([ Makefile src/Makefile test/Makefile + textomml/Makefile + textomml/config.dirs + ocaml/Makefile editex-config ]) AC_CONFIG_COMMANDS([default],[[chmod +x editex-config]],[[]])