summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehdi Dogguy <mehdi@debian.org>2010-01-09 11:24:08 +0100
committerMehdi Dogguy <mehdi@debian.org>2010-01-09 11:24:08 +0100
commita950dc97aae27f571d3e453c6360c3861f5ff4d3 (patch)
tree715bc4fb6bc1c93704376d8e2aa8b805635e3f71
parentdbc41e4e0a3e27e064d79c1bea580d8fa5c359f9 (diff)
parentcd5ab0c0cae33d157f96d6d763ba0c25862ad415 (diff)
Merge commit 'upstream/2.0.2'
-rw-r--r--CHANGES7
-rw-r--r--Makefile.in12
-rw-r--r--aclocal.m4346
-rw-r--r--bitstring_c.c37
-rw-r--r--cil-tools/Makefile.in4
-rw-r--r--cil-tools/ext3.c1
-rwxr-xr-xconfigure910
-rw-r--r--configure.ac4
-rw-r--r--pa_bitstring.ml6
9 files changed, 1074 insertions, 253 deletions
diff --git a/CHANGES b/CHANGES
index 57e7cf7..de09708 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,11 @@
------------------------------------------------------------------------
+r176 | richard.wm.jones | 2009-07-10 13:22:45 +0100 (Fri, 10 Jul 2009) | 2 lines
+Changed paths:
+ M /trunk/bitstring_c.c
+
+Fix for ARCH_ALIGN_INT64 platforms (Stephane Glondu).
+
+------------------------------------------------------------------------
r175 | richard.wm.jones | 2008-10-17 09:58:29 +0100 (Fri, 17 Oct 2008) | 2 lines
Changed paths:
M /trunk/configure.ac
diff --git a/Makefile.in b/Makefile.in
index 6f6a546..d64750d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,7 +15,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# $Id: Makefile.in 171 2008-08-28 16:44:07Z toots@rastageeks.org $
+# $Id: Makefile.in 183 2010-01-08 15:10:04Z richard.wm.jones $
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
@@ -33,8 +33,8 @@ BYTESWAP_H = @BYTESWAP_H@
OCAMLLIB = @OCAMLLIB@
top_srcdir = @top_srcdir@
-pkg_cil = @pkg_cil@
-pkg_extlib = @pkg_extlib@
+pkg_cil = @OCAML_PKG_cil@
+pkg_extlib = @OCAML_PKG_extlib@
enable_coverage = @enable_coverage@
@@ -109,11 +109,11 @@ bitstring_persistent.cmi: bitstring_persistent.mli
-I +camlp4 -pp camlp4of -c $<
pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
- $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 camlp4lib.cma \
+ $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
-pp camlp4of -c $< -o $@
bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
- $(OCAMLFIND) ocamlc -I +camlp4 unix.cma camlp4lib.cma \
+ $(OCAMLFIND) ocamlc -I +camlp4 unix.cma dynlink.cma camlp4lib.cma \
$(OCAMLCLIBS) \
bitstring.cma bitstring_persistent.cma \
$< -o $@
@@ -155,7 +155,7 @@ tests/test.bmpp: create_test_pattern
create_test_pattern: create_test_pattern.cmo
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -pp camlp4of \
- unix.cma -I +camlp4 camlp4lib.cma \
+ unix.cma -I +camlp4 dynlink.cma camlp4lib.cma \
$(OCAMLCLIBS) \
-I . bitstring.cma bitstring_persistent.cma $< -o $@
diff --git a/aclocal.m4 b/aclocal.m4
index 38ad15f..f4de067 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,170 +1,254 @@
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
dnl autoconf macros for OCaml
-dnl by Olivier Andrieu
-dnl modified by Richard W.M. Jones
-dnl from a configure.in by Jean-Christophe Filliâtre,
-dnl from a first script by Georges Mariano
dnl
-dnl defines AC_PROG_OCAML that will check the OCaml compiler
-dnl and set the following variables :
-dnl OCAMLC "ocamlc" if present in the path, or a failure
-dnl or "ocamlc.opt" if present with same version number as ocamlc
-dnl OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no"
-dnl OCAMLBEST either "byte" if no native compiler was found,
-dnl or "opt" otherwise
-dnl OCAMLDEP "ocamldep"
-dnl OCAMLLIB the path to the ocaml standard library
-dnl OCAMLVERSION the ocaml version number
-AC_DEFUN(AC_PROG_OCAML,
+dnl Copyright © 2009 Richard W.M. Jones
+dnl Copyright © 2009 Stefano Zacchiroli
+dnl Copyright © 2000-2005 Olivier Andrieu
+dnl Copyright © 2000-2005 Jean-Christophe Filliâtre
+dnl Copyright © 2000-2005 Georges Mariano
+dnl
+dnl For documentation, please read the ocaml.m4 man page.
+
+AC_DEFUN([AC_PROG_OCAML],
[dnl
-# checking for ocamlc
-AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,AC_MSG_ERROR(Cannot find ocamlc.))
-OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
-AC_MSG_RESULT(OCaml version is $OCAMLVERSION)
-OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
-AC_MSG_RESULT(OCaml library path is $OCAMLLIB)
-# checking for ocamlopt
-AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt)
-OCAMLBEST=byte
-if test -z "$OCAMLOPT"; then
- AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.)
-else
+ # checking for ocamlc
+ AC_CHECK_TOOL([OCAMLC],[ocamlc],[no])
+
+ if test "$OCAMLC" != "no"; then
+ OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
+ AC_MSG_RESULT([OCaml version is $OCAMLVERSION])
+ # If OCAMLLIB is set, use it
+ if test "$OCAMLLIB" = ""; then
+ OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
+ else
+ AC_MSG_RESULT([OCAMLLIB previously set; preserving it.])
+ fi
+ AC_MSG_RESULT([OCaml library path is $OCAMLLIB])
+
+ AC_SUBST([OCAMLVERSION])
+ AC_SUBST([OCAMLLIB])
+
+ # checking for ocamlopt
+ AC_CHECK_TOOL([OCAMLOPT],[ocamlopt],[no])
+ OCAMLBEST=byte
+ if test "$OCAMLOPT" = "no"; then
+ AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
+ else
TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
- AC_MSG_RESULT(versions differs from ocamlc; ocamlopt discarded.)
- unset OCAMLOPT
+ AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])
+ OCAMLOPT=no
else
OCAMLBEST=opt
fi
-fi
-# checking for ocamlc.opt
-AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt)
-if test -z "$OCAMLCDOTOPT"; then
+ fi
+
+ AC_SUBST([OCAMLBEST])
+
+ # checking for ocamlc.opt
+ AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
+ if test "$OCAMLCDOTOPT" != "no"; then
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
- AC_MSG_RESULT(versions differs from ocamlc; ocamlc.opt discarded.)
+ AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.])
else
OCAMLC=$OCAMLCDOTOPT
fi
-fi
-# checking for ocamlopt.opt
-if test "$OCAMLOPT" ; then
- AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt)
- if test "$OCAMLOPTDOTOPT"; then
- TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
- if test "$TMPVER" != "$OCAMLVERSION" ; then
- AC_MSG_RESULT(version differs from ocamlc; ocamlopt.opt discarded.)
- else
- OCAMLOPT=$OCAMLOPTDOTOPT
- fi
- fi
-fi
-# checking for ocamldep
-AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,AC_MSG_ERROR(Cannot find ocamldep.))
-
-#checking for ocamlmktop
-AC_CHECK_PROG(OCAMLMKTOP,ocamlmktop,ocamlmktop, AC_MSG_WARN(Cannot find ocamlmktop.))
-#checking for ocamlmklib
-AC_CHECK_PROG(OCAMLMKLIB,ocamlmklib,ocamlmklib, AC_MSG_WARN(Cannot find ocamlmklib.))
-# checking for ocamldoc
-AC_CHECK_PROG(OCAMLDOC,ocamldoc,ocamldoc, AC_MSG_WARN(Cannot find ocamldoc.))
-
-
-AC_SUBST(OCAMLC)
-AC_SUBST(OCAMLOPT)
-AC_SUBST(OCAMLDEP)
-AC_SUBST(OCAMLBEST)
-AC_SUBST(OCAMLVERSION)
-AC_SUBST(OCAMLLIB)
-AC_SUBST(OCAMLMKLIB)
-AC_SUBST(OCAMLDOC)
+ fi
+
+ # checking for ocamlopt.opt
+ if test "$OCAMLOPT" != "no" ; then
+ AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
+ if test "$OCAMLOPTDOTOPT" != "no"; then
+ TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.])
+ else
+ OCAMLOPT=$OCAMLOPTDOTOPT
+ fi
+ fi
+ fi
+
+ AC_SUBST([OCAMLOPT])
+ fi
+
+ AC_SUBST([OCAMLC])
+
+ # checking for ocaml toplevel
+ AC_CHECK_TOOL([OCAML],[ocaml],[no])
+
+ # checking for ocamldep
+ AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no])
+
+ # checking for ocamlmktop
+ AC_CHECK_TOOL([OCAMLMKTOP],[ocamlmktop],[no])
+
+ # checking for ocamlmklib
+ AC_CHECK_TOOL([OCAMLMKLIB],[ocamlmklib],[no])
+
+ # checking for ocamldoc
+ AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
+
+ # checking for ocamlbuild
+ AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
])
-dnl macro AC_PROG_OCAML_TOOLS will check OCamllex and OCamlyacc :
-dnl OCAMLLEX "ocamllex" or "ocamllex.opt" if present
-dnl OCAMLYACC "ocamlyac"
-AC_DEFUN(AC_PROG_OCAML_TOOLS,
+AC_DEFUN([AC_PROG_OCAMLLEX],
[dnl
-# checking for ocamllex and ocamlyacc
-AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex)
-if test "$OCAMLLEX"; then
- AC_CHECK_PROG(OCAMLLEXDOTOPT,ocamllex.opt,ocamllex.opt)
- if test "$OCAMLLEXDOTOPT"; then
+ # checking for ocamllex
+ AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
+ if test "$OCAMLLEX" != "no"; then
+ AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
+ if test "$OCAMLLEXDOTOPT" != "no"; then
OCAMLLEX=$OCAMLLEXDOTOPT
fi
-else
- AC_MSG_ERROR(Cannot find ocamllex.)
-fi
-AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,AC_MSG_ERROR(Cannot find ocamlyacc.))
-AC_SUBST(OCAMLLEX)
-AC_SUBST(OCAMLYACC)
+ fi
+ AC_SUBST([OCAMLLEX])
+])
+
+AC_DEFUN([AC_PROG_OCAMLYACC],
+[dnl
+ AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
+ AC_SUBST([OCAMLYACC])
])
-dnl AC_PROG_CAMLP4 checks for Camlp4
-AC_DEFUN(AC_PROG_CAMLP4,
+AC_DEFUN([AC_PROG_CAMLP4],
[dnl
-AC_REQUIRE([AC_PROG_OCAML])
-# checking for camlp4
-AC_CHECK_PROG(CAMLP4,camlp4,camlp4)
-if test "$CAMLP4"; then
- TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
- if test "$TMPVERSION" != "$OCAMLVERSION" ; then
- AC_MSG_RESULT(versions differs from ocamlc)
- fi
-fi
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+
+ # checking for camlp4
+ AC_CHECK_TOOL([CAMLP4],[camlp4],[no])
+ if test "$CAMLP4" != "no"; then
+ TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ AC_MSG_RESULT([versions differs from ocamlc])
+ CAMLP4=no
+ fi
+ fi
+ AC_SUBST([CAMLP4])
+
+ # checking for companion tools
+ AC_CHECK_TOOL([CAMLP4BOOT],[camlp4boot],[no])
+ AC_CHECK_TOOL([CAMLP4O],[camlp4o],[no])
+ AC_CHECK_TOOL([CAMLP4OF],[camlp4of],[no])
+ AC_CHECK_TOOL([CAMLP4OOF],[camlp4oof],[no])
+ AC_CHECK_TOOL([CAMLP4ORF],[camlp4orf],[no])
+ AC_CHECK_TOOL([CAMLP4PROF],[camlp4prof],[no])
+ AC_CHECK_TOOL([CAMLP4R],[camlp4r],[no])
+ AC_CHECK_TOOL([CAMLP4RF],[camlp4rf],[no])
+ AC_SUBST([CAMLP4BOOT])
+ AC_SUBST([CAMLP4O])
+ AC_SUBST([CAMLP4OF])
+ AC_SUBST([CAMLP4OOF])
+ AC_SUBST([CAMLP4ORF])
+ AC_SUBST([CAMLP4PROF])
+ AC_SUBST([CAMLP4R])
+ AC_SUBST([CAMLP4RF])
])
-dnl macro AC_PROG_FINDLIB will check for the presence of
-dnl ocamlfind
-AC_DEFUN(AC_PROG_FINDLIB,
+AC_DEFUN([AC_PROG_FINDLIB],
[dnl
-# checking for ocamlfind
-AC_CHECK_PROG(OCAMLFIND,ocamlfind,ocamlfind,
- AC_MSG_WARN([ocamlfind not found]))
-AC_SUBST(OCAMLFIND)
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+
+ # checking for ocamlfind
+ AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
+ AC_SUBST([OCAMLFIND])
])
-dnl AC_CHECK_OCAML_PKG checks wether a findlib package is present
-dnl defines pkg_name to "yes"
-AC_DEFUN(AC_CHECK_OCAML_PKG,
+dnl Thanks to Jim Meyering for working this next bit out for us.
+dnl XXX We should define AS_TR_SH if it's not defined already
+dnl (eg. for old autoconf).
+AC_DEFUN([AC_CHECK_OCAML_PKG],
[dnl
-AC_REQUIRE([AC_PROG_FINDLIB])
-AC_MSG_CHECKING(findlib package $1)
-if $OCAMLFIND query $1 >/dev/null 2>/dev/null; then
-AC_MSG_RESULT(found)
-eval "pkg_`echo $1 | tr - _`=yes"
-else
-AC_MSG_RESULT(not found)
-eval "pkg_`echo $1 | tr - _`=no"
-fi
+ AC_REQUIRE([AC_PROG_FINDLIB])dnl
+
+ AC_MSG_CHECKING([for OCaml findlib package $1])
+
+ unset found
+ unset pkg
+ found=no
+ for pkg in $1 $2 ; do
+ if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT([found])
+ AS_TR_SH([OCAML_PKG_$1])=$pkg
+ found=yes
+ break
+ fi
+ done
+ if test "$found" = "no" ; then
+ AC_MSG_RESULT([not found])
+ AS_TR_SH([OCAML_PKG_$1])=no
+ fi
+
+ AC_SUBST(AS_TR_SH([OCAML_PKG_$1]))
])
-dnl AC_CHECK_OCAML_MODULE looks for a module in a given path
-dnl 1st arg -> name (just for printing messages)
-dnl 2nd arg -> env var name (set to include path, or "no" if not found)
-dnl 3rd arg -> module to check
-dnl 4th arg -> default include dirs to check
AC_DEFUN([AC_CHECK_OCAML_MODULE],
[dnl
-AC_MSG_CHECKING(for module $1)
-cat > conftest.ml <<EOF
+ AC_MSG_CHECKING([for OCaml module $2])
+
+ cat > conftest.ml <<EOF
open $3
EOF
-unset found
-for $2 in $$2 $4 ; do
- if $OCAMLC -c -I "$$2" conftest.ml >&5 2>&5 ; then
- found=yes
- break
+ unset found
+ for $1 in $$1 $4 ; do
+ if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then
+ found=yes
+ break
+ fi
+ done
+
+ if test "$found" ; then
+ AC_MSG_RESULT([$$1])
+ else
+ AC_MSG_RESULT([not found])
+ $1=no
fi
-done
-if test "$found" ; then
- AC_MSG_RESULT($$2)
-else
- AC_MSG_RESULT(not found)
- $2=no
-fi
-AC_SUBST($2)])
+ AC_SUBST([$1])
+])
+
+
+dnl XXX Cross-compiling
+AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+ AC_MSG_CHECKING([for OCaml compiler word size])
+ cat > conftest.ml <<EOF
+ print_endline (string_of_int Sys.word_size)
+ EOF
+ OCAML_WORD_SIZE=`$OCAML conftest.ml`
+ AC_MSG_RESULT([$OCAML_WORD_SIZE])
+ AC_SUBST([OCAML_WORD_SIZE])
+])
+
+AC_DEFUN([AC_CHECK_OCAML_OS_TYPE],
+[dnl
+ AC_REQUIRE([AC_PROG_OCAML])dnl
+ AC_MSG_CHECKING([OCaml Sys.os_type])
+
+ cat > conftest.ml <<EOF
+ print_string(Sys.os_type);;
+EOF
+
+ OCAML_OS_TYPE=`$OCAML conftest.ml`
+ AC_MSG_RESULT([$OCAML_OS_TYPE])
+ AC_SUBST([OCAML_OS_TYPE])
+])
+
diff --git a/bitstring_c.c b/bitstring_c.c
index 5570f05..1921cfa 100644
--- a/bitstring_c.c
+++ b/bitstring_c.c
@@ -86,8 +86,6 @@ fastpath1(16,be,signed,int16_t)
fastpath1(16,le,signed,int16_t)
fastpath1(16,ne,signed,int16_t)
-/* XXX This probably doesn't work on ARCH_ALIGN_INT64 platforms. */
-
#define fastpath2(size,endian,signed,type,rval) \
CAMLprim value \
ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \
@@ -108,9 +106,32 @@ fastpath2(32,be,signed,int32_t,Int32_val)
fastpath2(32,le,signed,int32_t,Int32_val)
fastpath2(32,ne,signed,int32_t,Int32_val)
-fastpath2(64,be,unsigned,uint64_t,Int64_val)
-fastpath2(64,le,unsigned,uint64_t,Int64_val)
-fastpath2(64,ne,unsigned,uint64_t,Int64_val)
-fastpath2(64,be,signed,int64_t,Int64_val)
-fastpath2(64,le,signed,int64_t,Int64_val)
-fastpath2(64,ne,signed,int64_t,Int64_val)
+/* Special care needs to be taken on ARCH_ALIGN_INT64 platforms
+ (hppa and sparc in Debian). */
+
+#ifdef ARCH_ALIGN_INT64
+#include <caml/memory.h>
+#include <caml/alloc.h>
+#define fastpath3(size,endian,signed,type,rval) \
+ CAMLprim value \
+ ocaml_bitstring_extract_fastpath_int##size##_##endian##_##signed \
+ (value strv, value offv, value rv) \
+ { \
+ CAMLparam3(strv, offv, rv); \
+ type *ptr = (type *) ((void *) String_val (strv) + Int_val (offv)); \
+ type r; \
+ r = *ptr; \
+ swap_##endian(size,r); \
+ CAMLreturn(caml_copy_int64(r)); \
+ }
+
+#else
+#define fastpath3 fastpath2
+#endif
+
+fastpath3(64,be,unsigned,uint64_t,Int64_val)
+fastpath3(64,le,unsigned,uint64_t,Int64_val)
+fastpath3(64,ne,unsigned,uint64_t,Int64_val)
+fastpath3(64,be,signed,int64_t,Int64_val)
+fastpath3(64,le,signed,int64_t,Int64_val)
+fastpath3(64,ne,signed,int64_t,Int64_val)
diff --git a/cil-tools/Makefile.in b/cil-tools/Makefile.in
index 54435c0..933d7f2 100644
--- a/cil-tools/Makefile.in
+++ b/cil-tools/Makefile.in
@@ -15,7 +15,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
-# $Id: Makefile.in 158 2008-08-26 14:18:50Z richard.wm.jones $
+# $Id: Makefile.in 180 2010-01-08 14:43:07Z richard.wm.jones $
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
@@ -28,7 +28,7 @@ INSTALL = @INSTALL@
enable_coverage = @enable_coverage@
OCAMLCFLAGS = -g
-OCAMLCPACKAGES = -package unix,str,extlib,cil -I +camlp4 -I ..
+OCAMLCPACKAGES = -package dynlink,unix,str,extlib,cil -I +camlp4 -I ..
OCAMLCLIBS = $(OCAMLCPACKAGES) camlp4lib.cma -linkpkg ../bitstring.cma ../bitstring_persistent.cma
OCAMLOPTFLAGS =
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
diff --git a/cil-tools/ext3.c b/cil-tools/ext3.c
index c2267e4..b666016 100644
--- a/cil-tools/ext3.c
+++ b/cil-tools/ext3.c
@@ -17,6 +17,7 @@
/* Include files necessary to get the structure(s) and constant(s) we're
* interested in.
*/
+#include <linux/fs.h>
#include <linux/magic.h>
#include <linux/ext2_fs.h>
diff --git a/configure b/configure
index 8bf0e76..7f5fa37 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for ocaml-bitstring 2.0.0.
+# Generated by GNU Autoconf 2.63 for ocaml-bitstring 2.0.2.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -594,8 +594,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ocaml-bitstring'
PACKAGE_TARNAME='ocaml-bitstring'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='ocaml-bitstring 2.0.0'
+PACKAGE_VERSION='2.0.2'
+PACKAGE_STRING='ocaml-bitstring 2.0.2'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -641,20 +641,22 @@ BISECT_REPORT
GPROF
DIFF
TIME
-pkg_cil
-pkg_extlib
+OCAML_PKG_cil
+OCAML_PKG_extlib
CAMLP4OF
OCAMLFIND
-OCAMLLIB
-OCAMLVERSION
-OCAMLBEST
+OCAMLBUILD
OCAMLDOC
OCAMLMKLIB
OCAMLMKTOP
OCAMLDEP
+OCAML
OCAMLOPTDOTOPT
OCAMLCDOTOPT
+OCAMLBEST
OCAMLOPT
+OCAMLLIB
+OCAMLVERSION
OCAMLC
BYTESWAP_H
NATIVEENDIAN
@@ -1274,7 +1276,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ocaml-bitstring 2.0.0 to adapt to many kinds of systems.
+\`configure' configures ocaml-bitstring 2.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1335,7 +1337,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ocaml-bitstring 2.0.0:";;
+ short | recursive ) echo "Configuration of ocaml-bitstring 2.0.2:";;
esac
cat <<\_ACEOF
@@ -1420,7 +1422,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ocaml-bitstring configure 2.0.0
+ocaml-bitstring configure 2.0.2
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1434,7 +1436,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ocaml-bitstring $as_me 2.0.0, which was
+It was created by ocaml-bitstring $as_me 2.0.2, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -4192,9 +4194,10 @@ done
-# checking for ocamlc
-# Extract the first word of "ocamlc", so it can be a program name with args.
-set dummy ocamlc; ac_word=$2
+ # checking for ocamlc
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlc; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLC+set}" = set; then
@@ -4210,7 +4213,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLC="ocamlc"
+ ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4218,9 +4221,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLC" && ac_cv_prog_OCAMLC="{ { $as_echo "$as_me:$LINENO: error: Cannot find ocamlc." >&5
-$as_echo "$as_me: error: Cannot find ocamlc." >&2;}
- { (exit 1); exit 1; }; }"
fi
fi
OCAMLC=$ac_cv_prog_OCAMLC
@@ -4233,15 +4233,82 @@ $as_echo "no" >&6; }
fi
-OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
-{ $as_echo "$as_me:$LINENO: result: OCaml version is $OCAMLVERSION" >&5
+fi
+if test -z "$ac_cv_prog_OCAMLC"; then
+ ac_ct_OCAMLC=$OCAMLC
+ # Extract the first word of "ocamlc", so it can be a program name with args.
+set dummy ocamlc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLC"; then
+ ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLC="ocamlc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC
+if test -n "$ac_ct_OCAMLC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLC" >&5
+$as_echo "$ac_ct_OCAMLC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLC" = x; then
+ OCAMLC="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLC=$ac_ct_OCAMLC
+ fi
+else
+ OCAMLC="$ac_cv_prog_OCAMLC"
+fi
+
+
+ if test "$OCAMLC" != "no"; then
+ OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
+ { $as_echo "$as_me:$LINENO: result: OCaml version is $OCAMLVERSION" >&5
$as_echo "OCaml version is $OCAMLVERSION" >&6; }
-OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
-{ $as_echo "$as_me:$LINENO: result: OCaml library path is $OCAMLLIB" >&5
+ # If OCAMLLIB is set, use it
+ if test "$OCAMLLIB" = ""; then
+ OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
+ else
+ { $as_echo "$as_me:$LINENO: result: OCAMLLIB previously set; preserving it." >&5
+$as_echo "OCAMLLIB previously set; preserving it." >&6; }
+ fi
+ { $as_echo "$as_me:$LINENO: result: OCaml library path is $OCAMLLIB" >&5
$as_echo "OCaml library path is $OCAMLLIB" >&6; }
-# checking for ocamlopt
-# Extract the first word of "ocamlopt", so it can be a program name with args.
-set dummy ocamlopt; ac_word=$2
+
+
+
+
+ # checking for ocamlopt
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLOPT+set}" = set; then
@@ -4257,7 +4324,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLOPT="ocamlopt"
+ ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4277,23 +4344,81 @@ $as_echo "no" >&6; }
fi
-OCAMLBEST=byte
-if test -z "$OCAMLOPT"; then
+fi
+if test -z "$ac_cv_prog_OCAMLOPT"; then
+ ac_ct_OCAMLOPT=$OCAMLOPT
+ # Extract the first word of "ocamlopt", so it can be a program name with args.
+set dummy ocamlopt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLOPT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLOPT"; then
+ ac_cv_prog_ac_ct_OCAMLOPT="$ac_ct_OCAMLOPT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLOPT=$ac_cv_prog_ac_ct_OCAMLOPT
+if test -n "$ac_ct_OCAMLOPT"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLOPT" >&5
+$as_echo "$ac_ct_OCAMLOPT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLOPT" = x; then
+ OCAMLOPT="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLOPT=$ac_ct_OCAMLOPT
+ fi
+else
+ OCAMLOPT="$ac_cv_prog_OCAMLOPT"
+fi
+
+ OCAMLBEST=byte
+ if test "$OCAMLOPT" = "no"; then
{ $as_echo "$as_me:$LINENO: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
$as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
-else
+ else
TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
{ $as_echo "$as_me:$LINENO: result: versions differs from ocamlc; ocamlopt discarded." >&5
$as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
- unset OCAMLOPT
+ OCAMLOPT=no
else
OCAMLBEST=opt
fi
-fi
-# checking for ocamlc.opt
-# Extract the first word of "ocamlc.opt", so it can be a program name with args.
-set dummy ocamlc.opt; ac_word=$2
+ fi
+
+
+
+ # checking for ocamlc.opt
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLCDOTOPT+set}" = set; then
@@ -4309,7 +4434,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLCDOTOPT="ocamlc.opt"
+ ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4329,7 +4454,61 @@ $as_echo "no" >&6; }
fi
-if test -z "$OCAMLCDOTOPT"; then
+fi
+if test -z "$ac_cv_prog_OCAMLCDOTOPT"; then
+ ac_ct_OCAMLCDOTOPT=$OCAMLCDOTOPT
+ # Extract the first word of "ocamlc.opt", so it can be a program name with args.
+set dummy ocamlc.opt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLCDOTOPT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLCDOTOPT"; then
+ ac_cv_prog_ac_ct_OCAMLCDOTOPT="$ac_ct_OCAMLCDOTOPT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLCDOTOPT=$ac_cv_prog_ac_ct_OCAMLCDOTOPT
+if test -n "$ac_ct_OCAMLCDOTOPT"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLCDOTOPT" >&5
+$as_echo "$ac_ct_OCAMLCDOTOPT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLCDOTOPT" = x; then
+ OCAMLCDOTOPT="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLCDOTOPT=$ac_ct_OCAMLCDOTOPT
+ fi
+else
+ OCAMLCDOTOPT="$ac_cv_prog_OCAMLCDOTOPT"
+fi
+
+ if test "$OCAMLCDOTOPT" != "no"; then
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
{ $as_echo "$as_me:$LINENO: result: versions differs from ocamlc; ocamlc.opt discarded." >&5
@@ -4337,11 +4516,13 @@ $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; }
else
OCAMLC=$OCAMLCDOTOPT
fi
-fi
-# checking for ocamlopt.opt
-if test "$OCAMLOPT" ; then
- # Extract the first word of "ocamlopt.opt", so it can be a program name with args.
-set dummy ocamlopt.opt; ac_word=$2
+ fi
+
+ # checking for ocamlopt.opt
+ if test "$OCAMLOPT" != "no" ; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLOPTDOTOPT+set}" = set; then
@@ -4357,7 +4538,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLOPTDOTOPT="ocamlopt.opt"
+ ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4377,19 +4558,174 @@ $as_echo "no" >&6; }
fi
- if test "$OCAMLOPTDOTOPT"; then
- TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
- if test "$TMPVER" != "$OCAMLVERSION" ; then
- { $as_echo "$as_me:$LINENO: result: version differs from ocamlc; ocamlopt.opt discarded." >&5
+fi
+if test -z "$ac_cv_prog_OCAMLOPTDOTOPT"; then
+ ac_ct_OCAMLOPTDOTOPT=$OCAMLOPTDOTOPT
+ # Extract the first word of "ocamlopt.opt", so it can be a program name with args.
+set dummy ocamlopt.opt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLOPTDOTOPT"; then
+ ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="$ac_ct_OCAMLOPTDOTOPT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLOPTDOTOPT=$ac_cv_prog_ac_ct_OCAMLOPTDOTOPT
+if test -n "$ac_ct_OCAMLOPTDOTOPT"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLOPTDOTOPT" >&5
+$as_echo "$ac_ct_OCAMLOPTDOTOPT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLOPTDOTOPT" = x; then
+ OCAMLOPTDOTOPT="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLOPTDOTOPT=$ac_ct_OCAMLOPTDOTOPT
+ fi
+else
+ OCAMLOPTDOTOPT="$ac_cv_prog_OCAMLOPTDOTOPT"
+fi
+
+ if test "$OCAMLOPTDOTOPT" != "no"; then
+ TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
+ if test "$TMPVERSION" != "$OCAMLVERSION" ; then
+ { $as_echo "$as_me:$LINENO: result: version differs from ocamlc; ocamlopt.opt discarded." >&5
$as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; }
- else
- OCAMLOPT=$OCAMLOPTDOTOPT
- fi
- fi
+ else
+ OCAMLOPT=$OCAMLOPTDOTOPT
+ fi
+ fi
+ fi
+
+
+ fi
+
+
+
+ # checking for ocaml toplevel
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocaml; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OCAML+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OCAML"; then
+ ac_cv_prog_OCAML="$OCAML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OCAML="${ac_tool_prefix}ocaml"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
fi
-# checking for ocamldep
-# Extract the first word of "ocamldep", so it can be a program name with args.
-set dummy ocamldep; ac_word=$2
+fi
+OCAML=$ac_cv_prog_OCAML
+if test -n "$OCAML"; then
+ { $as_echo "$as_me:$LINENO: result: $OCAML" >&5
+$as_echo "$OCAML" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OCAML"; then
+ ac_ct_OCAML=$OCAML
+ # Extract the first word of "ocaml", so it can be a program name with args.
+set dummy ocaml; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAML+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAML"; then
+ ac_cv_prog_ac_ct_OCAML="$ac_ct_OCAML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAML="ocaml"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAML=$ac_cv_prog_ac_ct_OCAML
+if test -n "$ac_ct_OCAML"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAML" >&5
+$as_echo "$ac_ct_OCAML" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAML" = x; then
+ OCAML="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAML=$ac_ct_OCAML
+ fi
+else
+ OCAML="$ac_cv_prog_OCAML"
+fi
+
+
+ # checking for ocamldep
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamldep; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLDEP+set}" = set; then
@@ -4405,7 +4741,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLDEP="ocamldep"
+ ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4413,9 +4749,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLDEP" && ac_cv_prog_OCAMLDEP="{ { $as_echo "$as_me:$LINENO: error: Cannot find ocamldep." >&5
-$as_echo "$as_me: error: Cannot find ocamldep." >&2;}
- { (exit 1); exit 1; }; }"
fi
fi
OCAMLDEP=$ac_cv_prog_OCAMLDEP
@@ -4428,10 +4761,65 @@ $as_echo "no" >&6; }
fi
+fi
+if test -z "$ac_cv_prog_OCAMLDEP"; then
+ ac_ct_OCAMLDEP=$OCAMLDEP
+ # Extract the first word of "ocamldep", so it can be a program name with args.
+set dummy ocamldep; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLDEP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLDEP"; then
+ ac_cv_prog_ac_ct_OCAMLDEP="$ac_ct_OCAMLDEP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLDEP="ocamldep"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
-#checking for ocamlmktop
-# Extract the first word of "ocamlmktop", so it can be a program name with args.
-set dummy ocamlmktop; ac_word=$2
+fi
+fi
+ac_ct_OCAMLDEP=$ac_cv_prog_ac_ct_OCAMLDEP
+if test -n "$ac_ct_OCAMLDEP"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLDEP" >&5
+$as_echo "$ac_ct_OCAMLDEP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLDEP" = x; then
+ OCAMLDEP="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLDEP=$ac_ct_OCAMLDEP
+ fi
+else
+ OCAMLDEP="$ac_cv_prog_OCAMLDEP"
+fi
+
+
+ # checking for ocamlmktop
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLMKTOP+set}" = set; then
@@ -4447,7 +4835,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLMKTOP="ocamlmktop"
+ ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4455,8 +4843,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLMKTOP" && ac_cv_prog_OCAMLMKTOP="{ $as_echo "$as_me:$LINENO: WARNING: Cannot find ocamlmktop." >&5
-$as_echo "$as_me: WARNING: Cannot find ocamlmktop." >&2;}"
fi
fi
OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP
@@ -4469,9 +4855,65 @@ $as_echo "no" >&6; }
fi
-#checking for ocamlmklib
-# Extract the first word of "ocamlmklib", so it can be a program name with args.
-set dummy ocamlmklib; ac_word=$2
+fi
+if test -z "$ac_cv_prog_OCAMLMKTOP"; then
+ ac_ct_OCAMLMKTOP=$OCAMLMKTOP
+ # Extract the first word of "ocamlmktop", so it can be a program name with args.
+set dummy ocamlmktop; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLMKTOP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLMKTOP"; then
+ ac_cv_prog_ac_ct_OCAMLMKTOP="$ac_ct_OCAMLMKTOP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLMKTOP=$ac_cv_prog_ac_ct_OCAMLMKTOP
+if test -n "$ac_ct_OCAMLMKTOP"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLMKTOP" >&5
+$as_echo "$ac_ct_OCAMLMKTOP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLMKTOP" = x; then
+ OCAMLMKTOP="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLMKTOP=$ac_ct_OCAMLMKTOP
+ fi
+else
+ OCAMLMKTOP="$ac_cv_prog_OCAMLMKTOP"
+fi
+
+
+ # checking for ocamlmklib
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLMKLIB+set}" = set; then
@@ -4487,7 +4929,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLMKLIB="ocamlmklib"
+ ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4495,8 +4937,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLMKLIB" && ac_cv_prog_OCAMLMKLIB="{ $as_echo "$as_me:$LINENO: WARNING: Cannot find ocamlmklib." >&5
-$as_echo "$as_me: WARNING: Cannot find ocamlmklib." >&2;}"
fi
fi
OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB
@@ -4509,9 +4949,65 @@ $as_echo "no" >&6; }
fi
-# checking for ocamldoc
-# Extract the first word of "ocamldoc", so it can be a program name with args.
-set dummy ocamldoc; ac_word=$2
+fi
+if test -z "$ac_cv_prog_OCAMLMKLIB"; then
+ ac_ct_OCAMLMKLIB=$OCAMLMKLIB
+ # Extract the first word of "ocamlmklib", so it can be a program name with args.
+set dummy ocamlmklib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLMKLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLMKLIB"; then
+ ac_cv_prog_ac_ct_OCAMLMKLIB="$ac_ct_OCAMLMKLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLMKLIB=$ac_cv_prog_ac_ct_OCAMLMKLIB
+if test -n "$ac_ct_OCAMLMKLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLMKLIB" >&5
+$as_echo "$ac_ct_OCAMLMKLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLMKLIB" = x; then
+ OCAMLMKLIB="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLMKLIB=$ac_ct_OCAMLMKLIB
+ fi
+else
+ OCAMLMKLIB="$ac_cv_prog_OCAMLMKLIB"
+fi
+
+
+ # checking for ocamldoc
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLDOC+set}" = set; then
@@ -4527,7 +5023,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLDOC="ocamldoc"
+ ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4535,8 +5031,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLDOC" && ac_cv_prog_OCAMLDOC="{ $as_echo "$as_me:$LINENO: WARNING: Cannot find ocamldoc." >&5
-$as_echo "$as_me: WARNING: Cannot find ocamldoc." >&2;}"
fi
fi
OCAMLDOC=$ac_cv_prog_OCAMLDOC
@@ -4549,20 +5043,160 @@ $as_echo "no" >&6; }
fi
+fi
+if test -z "$ac_cv_prog_OCAMLDOC"; then
+ ac_ct_OCAMLDOC=$OCAMLDOC
+ # Extract the first word of "ocamldoc", so it can be a program name with args.
+set dummy ocamldoc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLDOC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLDOC"; then
+ ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC
+if test -n "$ac_ct_OCAMLDOC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLDOC" >&5
+$as_echo "$ac_ct_OCAMLDOC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "x$ac_ct_OCAMLDOC" = x; then
+ OCAMLDOC="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLDOC=$ac_ct_OCAMLDOC
+ fi
+else
+ OCAMLDOC="$ac_cv_prog_OCAMLDOC"
+fi
+ # checking for ocamlbuild
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OCAMLBUILD+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OCAMLBUILD"; then
+ ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+fi
+fi
+OCAMLBUILD=$ac_cv_prog_OCAMLBUILD
+if test -n "$OCAMLBUILD"; then
+ { $as_echo "$as_me:$LINENO: result: $OCAMLBUILD" >&5
+$as_echo "$OCAMLBUILD" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+fi
+if test -z "$ac_cv_prog_OCAMLBUILD"; then
+ ac_ct_OCAMLBUILD=$OCAMLBUILD
+ # Extract the first word of "ocamlbuild", so it can be a program name with args.
+set dummy ocamlbuild; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLBUILD+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLBUILD"; then
+ ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+fi
+fi
+ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD
+if test -n "$ac_ct_OCAMLBUILD"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLBUILD" >&5
+$as_echo "$ac_ct_OCAMLBUILD" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "x$ac_ct_OCAMLBUILD" = x; then
+ OCAMLBUILD="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLBUILD=$ac_ct_OCAMLBUILD
+ fi
+else
+ OCAMLBUILD="$ac_cv_prog_OCAMLBUILD"
+fi
-# checking for ocamlfind
-# Extract the first word of "ocamlfind", so it can be a program name with args.
-set dummy ocamlfind; ac_word=$2
+ # checking for ocamlfind
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_OCAMLFIND+set}" = set; then
@@ -4578,7 +5212,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OCAMLFIND="ocamlfind"
+ ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4586,8 +5220,6 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_OCAMLFIND" && ac_cv_prog_OCAMLFIND="{ $as_echo "$as_me:$LINENO: WARNING: ocamlfind not found" >&5
-$as_echo "$as_me: WARNING: ocamlfind not found" >&2;}"
fi
fi
OCAMLFIND=$ac_cv_prog_OCAMLFIND
@@ -4600,6 +5232,60 @@ $as_echo "no" >&6; }
fi
+fi
+if test -z "$ac_cv_prog_OCAMLFIND"; then
+ ac_ct_OCAMLFIND=$OCAMLFIND
+ # Extract the first word of "ocamlfind", so it can be a program name with args.
+set dummy ocamlfind; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLFIND+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OCAMLFIND"; then
+ ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND
+if test -n "$ac_ct_OCAMLFIND"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_OCAMLFIND" >&5
+$as_echo "$ac_ct_OCAMLFIND" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OCAMLFIND" = x; then
+ OCAMLFIND="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OCAMLFIND=$ac_ct_OCAMLFIND
+ fi
+else
+ OCAMLFIND="$ac_cv_prog_OCAMLFIND"
+fi
+
@@ -4654,32 +5340,52 @@ $as_echo "$as_me: error: You must have camlp4 installed" >&2;}
fi
-{ $as_echo "$as_me:$LINENO: checking findlib package extlib" >&5
-$as_echo_n "checking findlib package extlib... " >&6; }
-if $OCAMLFIND query extlib >/dev/null 2>/dev/null; then
-{ $as_echo "$as_me:$LINENO: result: found" >&5
+ { $as_echo "$as_me:$LINENO: checking for OCaml findlib package extlib" >&5
+$as_echo_n "checking for OCaml findlib package extlib... " >&6; }
+
+ unset found
+ unset pkg
+ found=no
+ for pkg in extlib ; do
+ if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
+ { $as_echo "$as_me:$LINENO: result: found" >&5
$as_echo "found" >&6; }
-eval "pkg_`echo extlib | tr - _`=yes"
-else
-{ $as_echo "$as_me:$LINENO: result: not found" >&5
+ OCAML_PKG_extlib=$pkg
+ found=yes
+ break
+ fi
+ done
+ if test "$found" = "no" ; then
+ { $as_echo "$as_me:$LINENO: result: not found" >&5
$as_echo "not found" >&6; }
-eval "pkg_`echo extlib | tr - _`=no"
-fi
+ OCAML_PKG_extlib=no
+ fi
-{ $as_echo "$as_me:$LINENO: checking findlib package cil" >&5
-$as_echo_n "checking findlib package cil... " >&6; }
-if $OCAMLFIND query cil >/dev/null 2>/dev/null; then
-{ $as_echo "$as_me:$LINENO: result: found" >&5
+
+ { $as_echo "$as_me:$LINENO: checking for OCaml findlib package cil" >&5
+$as_echo_n "checking for OCaml findlib package cil... " >&6; }
+
+ unset found
+ unset pkg
+ found=no
+ for pkg in cil ; do
+ if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
+ { $as_echo "$as_me:$LINENO: result: found" >&5
$as_echo "found" >&6; }
-eval "pkg_`echo cil | tr - _`=yes"
-else
-{ $as_echo "$as_me:$LINENO: result: not found" >&5
+ OCAML_PKG_cil=$pkg
+ found=yes
+ break
+ fi
+ done
+ if test "$found" = "no" ; then
+ { $as_echo "$as_me:$LINENO: result: not found" >&5
$as_echo "not found" >&6; }
-eval "pkg_`echo cil | tr - _`=no"
-fi
+ OCAML_PKG_cil=no
+ fi
+
@@ -5294,7 +6000,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ocaml-bitstring $as_me 2.0.0, which was
+This file was extended by ocaml-bitstring $as_me 2.0.2, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5353,7 +6059,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-ocaml-bitstring config.status 2.0.0
+ocaml-bitstring config.status 2.0.2
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index e8e0ec3..174ed8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ocaml-bitstring,2.0.0)
+AC_INIT(ocaml-bitstring,2.0.2)
dnl Check for basic C environment.
AC_PROG_CC
@@ -66,11 +66,9 @@ fi
dnl Check for Extlib (optional)
AC_CHECK_OCAML_PKG(extlib)
-AC_SUBST(pkg_extlib)
dnl Check for CIL (optional)
AC_CHECK_OCAML_PKG(cil)
-AC_SUBST(pkg_cil)
dnl Check for /usr/bin/time and get full path.
AC_PATH_PROG(TIME,time,no)
diff --git a/pa_bitstring.ml b/pa_bitstring.ml
index 0b0678d..14b3f11 100644
--- a/pa_bitstring.ml
+++ b/pa_bitstring.ml
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id: pa_bitstring.ml 173 2008-10-17 08:57:43Z richard.wm.jones $
+ * $Id: pa_bitstring.ml 179 2010-01-08 14:28:17Z richard.wm.jones $
*)
open Printf
@@ -1123,6 +1123,10 @@ EXTEND Gram
fields = LIST0 patt_field SEP ";";
"}" ->
List.concat fields
+ | "{";
+ "_";
+ "}" ->
+ []
]
];