]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtksourceview/configure.ac
lablgtksourceview: first checkin, almost nothing bound ...
[helm.git] / helm / DEVEL / lablgtksourceview / configure.ac
diff --git a/helm/DEVEL/lablgtksourceview/configure.ac b/helm/DEVEL/lablgtksourceview/configure.ac
new file mode 100644 (file)
index 0000000..144cf54
--- /dev/null
@@ -0,0 +1,52 @@
+AC_INIT(gSourceView.ml)
+
+PACKAGE="lablgtksourceview"
+
+MAJOR_VERSION="0"
+MINOR_VERSION="0"
+MICRO_VERSION="1"
+VERSION="$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION"
+
+PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-1.0 >= 1.2.0])
+
+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)
+fi
+
+FINDLIB_REQUIRES="lablgtk2"
+
+for r in $FINDLIB_REQUIRES
+do
+  AC_MSG_CHECKING(for $r ocaml library)
+  if ocamlfind query $r &> /dev/null; then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_ERROR(could not find $r ocaml library)
+  fi
+done
+
+AC_MSG_CHECKING(for the ocaml library dir)
+OCAML_LIB_DIR=`ocamlfind ocamlc -where`
+AC_MSG_RESULT($OCAML_LIB_DIR)
+OCAML_STUB_DIR="$OCAML_LIB_DIR/stublibs"
+
+AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
+       OCAML_INCLUDE_DIR=/usr/include/caml,
+       AC_MSG_ERROR(could not find ocaml header files)
+)
+
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+AC_SUBST(GTKSOURCEVIEW_CFLAGS)
+AC_SUBST(GTKSOURCEVIEW_LIBS)
+AC_SUBST(OCAML_LIB_DIR)
+AC_SUBST(OCAML_STUB_DIR)
+AC_SUBST(OCAML_INCLUDE_DIR)
+
+AC_OUTPUT([
+  test/Makefile
+  Makefile
+  META
+])
+