diff options
author | Olivier Andrieu <oandrieu@gmail.com> | 2010-01-19 10:41:16 +0100 |
---|---|---|
committer | Olivier Andrieu <oandrieu@gmail.com> | 2010-01-19 10:41:16 +0100 |
commit | 13c7da8f40da6eeffe2545e1c926ce9955849648 (patch) | |
tree | eddf454fbfda241a04b853fb0e1c2113452e8827 | |
parent | a5c5ee9f6431d667b8cd88c7706856396afb0f62 (diff) |
Some autoconf/compilation fixes
- fix the AC_CHECK_OCAML_MODULE macro (arguments order)
- add the caml_ba_byte_size prototype (not exported in OCaml 3.10)
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | src/ml_cairo_bigarr.c | 3 | ||||
-rw-r--r-- | support/ocaml.m4 | 10 |
3 files changed, 8 insertions, 7 deletions
@@ -20,7 +20,7 @@ If you want to disable LablGTK support, run configure with Dependencies ============ - ocaml >= 3.08 + ocaml >= 3.11 cairo >= 1.2.0 libsvg-cairo optional >= 0.1.5 LablGTK optional, GTK+ >= 2.8 diff --git a/src/ml_cairo_bigarr.c b/src/ml_cairo_bigarr.c index 0f93500..4f114d0 100644 --- a/src/ml_cairo_bigarr.c +++ b/src/ml_cairo_bigarr.c @@ -10,7 +10,8 @@ #include <caml/bigarray.h> -unsigned long bigarray_byte_size (struct caml_ba_array *); +/* This prototype is only exported since OCaml 3.11 */ +unsigned long caml_ba_byte_size (struct caml_ba_array *); CAMLprim value ml_bigarray_byte_size (value b) diff --git a/support/ocaml.m4 b/support/ocaml.m4 index 326d99e..9d6e910 100644 --- a/support/ocaml.m4 +++ b/support/ocaml.m4 @@ -173,26 +173,26 @@ AC_DEFUN([AC_CHECK_OCAML_PKG], AC_DEFUN([AC_CHECK_OCAML_MODULE], [dnl - AC_MSG_CHECKING([for OCaml module $2]) + AC_MSG_CHECKING([for OCaml module $1]) cat > conftest.ml <<EOF open $3 EOF unset found - for $1 in $$1 $4 ; do - if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then + for $2 in $$2 $4 ; do + if $OCAMLC -c -I "$$2" conftest.ml >&5 2>&5 ; then found=yes break fi done if test "$found" ; then - AC_MSG_RESULT([$$1]) + AC_MSG_RESULT([$$2]) else AC_MSG_RESULT([not found]) $1=no fi - AC_SUBST([$1]) + AC_SUBST([$2]) ]) |