+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)
+
+if test $profile = yes; then
+ CFLAFS="$CFLAGS -O0 -pg"
+ CXXFLAGS="$CXXFLAGS -O0 -pg"
+ AC_DEFINE(ENABLE_PROFILE,,[Define to 1 to let the widget collect some information for profiling purposes])
+fi