From b536c61a6df3debf9138b9fa0e4be7ba598b7557 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Nov 2021 09:44:22 +0000 Subject: [PATCH] m4: Remove test for OCaml Bytes module --- m4/guestfs-ocaml.m4 | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 index d7f9462ea..24b9047af 100644 --- a/m4/guestfs-ocaml.m4 +++ b/m4/guestfs-ocaml.m4 @@ -155,7 +155,6 @@ AC_SUBST([HIVEX_OPEN_UNSAFE_FLAG]) OCAML_PKG_gettext=no OCAML_PKG_ounit2=no ounit_is_v2=no -have_Bytes_module=no AS_IF([test "x$OCAMLC" != "xno"],[ # Create common/mlgettext/common_gettext.ml gettext functions or stubs. @@ -171,20 +170,6 @@ AS_IF([test "x$OCAMLC" != "xno"],[ if test "x$OCAML_PKG_ounit2" != "xno"; then AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2]) fi - - # Check if we have the 'Bytes' module. If not (OCaml < 4.02) then - # we need to create a compatibility module. - # AC_CHECK_OCAML_MODULE is a bit broken, so open code this test. - AC_MSG_CHECKING([for OCaml module Bytes]) - rm -f conftest.ml - echo 'let s = Bytes.empty' > conftest.ml - if $OCAMLC -c conftest.ml >&5 2>&5 ; then - AC_MSG_RESULT([yes]) - have_Bytes_module=yes - else - AC_MSG_RESULT([not found]) - have_Bytes_module=no - fi ]) AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT], [test "x$OCAML_PKG_gettext" != "xno"]) @@ -195,24 +180,6 @@ AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no]) AM_CONDITIONAL([HAVE_OCAML_GETTEXT], [test "x$OCAML_PKG_gettext" != "xno" && test "x$OCAML_GETTEXT" != "xno"]) -dnl Create the backwards compatibility Bytes module for OCaml < 4.02. -mkdir -p common/mlstdutils -rm -f common/mlstdutils/bytes.ml common/mlstdutils/bytes.mli -AS_IF([test "x$have_Bytes_module" = "xno"],[ - cat > common/mlstdutils/bytes.ml < common/mlstdutils/bytes.mli - safe_string_option= -],[ - safe_string_option="-safe-string" -]) -AM_CONDITIONAL([HAVE_BYTES_COMPAT_ML], - [test "x$have_Bytes_module" = "xno"]) - dnl Check if OCaml has caml_alloc_initialized_string (added 2017). AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \ test "x$enable_ocaml" = "xyes"],[