diff -Nru ocaml-tools-2007.06.24/autoconf/configure.in ocaml-tools-20090719/autoconf/configure.in --- ocaml-tools-2007.06.24/autoconf/configure.in 2007-06-24 21:24:46.000000000 +0100 +++ ocaml-tools-20090719/autoconf/configure.in 2009-07-19 16:53:00.000000000 +0100 @@ -1,4 +1,10 @@ -# + +# WARNING: THESE MACROS ARE OBSOLETE +# More up to date autoconf macros for OCaml are now available under +# the name of ocaml-autoconf at: http://ocaml-autoconf.forge.ocamlcore.org/ +# In Debian, they are shipped by the ocaml-tools package. +# Just type "man ocaml.m4" to discover how to user them. + # autoconf input for Objective Caml programs # Copyright (C) 2001 Jean-Christophe Filliâtre # from a first script by Georges Mariano diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/autoconf/Makefile.in /tmp/OFl0q2nd8h/ocaml-tools-20090719/autoconf/Makefile.in --- ocaml-tools-2007.06.24/autoconf/Makefile.in 2007-06-24 21:24:46.000000000 +0100 +++ ocaml-tools-20090719/autoconf/Makefile.in 2009-07-19 16:55:36.000000000 +0100 @@ -1,3 +1,10 @@ + +# WARNING: THIS EXAMPLE IS BASED ON OBSOLETE AUTOCONF MACROS +# More up to date autoconf macros for OCaml are now available under +# the name of ocaml-autoconf at: http://ocaml-autoconf.forge.ocamlcore.org/ +# In Debian, they are shipped by the ocaml-tools package. +# Just type "man ocaml.m4" to discover how to user them. + # # sample Makefile for Objective Caml # Copyright (C) 2001 Jean-Christophe FILLIATRE diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/changelog /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/changelog --- ocaml-tools-2007.06.24/debian/changelog 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/changelog 2009-11-06 09:48:13.000000000 +0000 @@ -1,3 +1,27 @@ +ocaml-tools (20090719-1) unstable; urgency=low + + [ Stefano Zacchiroli ] + * add ocaml-autoconf: autoconf macros for OCaml + - upstream git snapshot, commit: d0ad968 + * fix vcs-svn field to point just above the debian/ dir + * debian/control: + - bump Standards-Version to 3.8.2 (no changes needed) + - clean up inactive maintainers from Uploaders + - revamp short and long descriptions + * debian/copyright: + - add copyright info for ocaml-autoconf + - fix path pointing to GPL-2 (omlet's license) + - change encoding to UTF-8 + * debian/compat: bump to 5 (minimum, non deprecated level) + * debian/rules: + - delegate file installation do appropriate dh_* + - use dh_lintian to install lintian overrides + + [ Ralf Treinen ] + * changed section to ocaml + + -- Stefano Zacchiroli Sun, 19 Jul 2009 16:43:19 +0200 + ocaml-tools (2007.06.24-2) unstable; urgency=low * Comply to the new vim policy for omlet: recommend vim-addon-manager, diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/compat /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/compat --- ocaml-tools-2007.06.24/debian/compat 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/compat 2009-11-06 09:48:13.000000000 +0000 @@ -1 +1 @@ -4 +5 diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/control /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/control --- ocaml-tools-2007.06.24/debian/control 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/control 2009-11-06 09:48:13.000000000 +0000 @@ -1,12 +1,15 @@ Source: ocaml-tools -Section: devel +Section: ocaml Priority: optional Maintainer: Debian OCaml Maintainers -Uploaders: Ralf Treinen , Sven Luther , Remi Vanicat , Stefano Zacchiroli , Samuel Mimram -Build-Depends: debhelper (>= 4.0) -Standards-Version: 3.7.2 -XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/ocaml-tools -XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocaml-tools/trunk/ +Uploaders: + Ralf Treinen , + Stefano Zacchiroli , + Samuel Mimram +Build-Depends: debhelper (>= 6.0.7~) +Standards-Version: 3.8.2 +Vcs-Svn: svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/ocaml-tools/trunk +Vcs-Browser: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocaml-tools/trunk/ Package: ocaml-tools Architecture: all @@ -14,7 +17,10 @@ Recommends: vim, vim-addon-manager Enhances: ocaml Suggests: autoconf, otags -Description: various tools for ocaml programmers - This package collects various tools for ocaml programmers: - - a configure.in and Makefile.in template - - omlet: a better ocaml indentation mode for vim +Description: tools for OCaml developers + This package collects various tools to help developing Objectiva Caml + (OCaml) programs; in particular it contains: + . + * ocaml-autoconf: autoconf macros for OCaml + * omlet: a better OCaml indentation mode for vim + * a configure.in and Makefile.in template diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/copyright /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/copyright --- ocaml-tools-2007.06.24/debian/copyright 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/copyright 2009-11-06 09:48:13.000000000 +0000 @@ -1,17 +1,38 @@ This package was debianized by Ralf Treinen on Sat, 24 Mar 2001 18:49:15 +0100. +ocaml-autoconf +-------------- + +Downloaded from http://ocaml-autoconf.forge.ocamlcore.org/ + +Upstream Authors: Richard W.M. Jones and Stefano Zacchiroli + +Copyright: © 2009 Richard W.M. Jones + © 2009 Stefano Zacchiroli + © 2000-2005 Olivier Andrieu + © 2000-2005 Jean-Christophe Filliâtre + © 2000-2005 Georges Mariano + +License: + +This program is distributed under the BSD "3-clauses" license. On +Debian systems, the full text of the license can be found in the file +/usr/share/common-licenses/BSD . + configure.in and Makefile.in ---------------------------- Downloaded from http://www.lri.fr/~filliatr/software.en.html -Upstream Author: Jean-Christophe Filliâtre +Upstream Author: Jean-Christophe Filliâtre + +Copyright: © 2001 Jean-Christophe Filliâtre -Copyright: +License: This program is distributed under the GNU Library General Public License version 2. On a Debian system the GNU LGPL can be found in -the file /usr/share/common-licenses/LGPL-2. +the file /usr/share/common-licenses/LGPL-2 . omlet @@ -28,5 +49,5 @@ (at your option) any later version. On Debian systems you can find a copy of this license in -/usr/share/common-licenses/GPL.X +/usr/share/common-licenses/GPL-2 diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/dirs /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/dirs --- ocaml-tools-2007.06.24/debian/dirs 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/dirs 2009-11-06 09:48:13.000000000 +0000 @@ -3,3 +3,4 @@ usr/share/ocaml-tools/omlet usr/share/vim/registry usr/share/lintian/overrides +usr/share/ocaml-autoconf diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/docs /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/docs --- ocaml-tools-2007.06.24/debian/docs 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/debian/docs 2009-11-06 09:48:13.000000000 +0000 @@ -0,0 +1,4 @@ +ocaml-autoconf/README.ocaml-autoconf +ocaml-autoconf/ocaml.m4.txt +omlet-*/README.omlet +omlet-*/changelog.omlet diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/install /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/install --- ocaml-tools-2007.06.24/debian/install 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/debian/install 2009-11-06 09:48:13.000000000 +0000 @@ -0,0 +1,10 @@ +# OCaml autoconf +ocaml-autoconf/ocaml.m4 /usr/share/ocaml-autoconf +ocaml-autoconf/ocaml.m4.txt /usr/share/doc/ocaml-tools + +# omlet +debian/vim-omlet.yaml /usr/share/vim/registry + +# autoconf samples +autoconf/configure.in /usr/share/ocaml-tools +autoconf/Makefile.in /usr/share/ocaml-tools diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/manpages /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/manpages --- ocaml-tools-2007.06.24/debian/manpages 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/debian/manpages 2009-11-06 09:48:13.000000000 +0000 @@ -0,0 +1 @@ +ocaml-autoconf/ocaml.m4.1 diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/debian/rules /tmp/OFl0q2nd8h/ocaml-tools-20090719/debian/rules --- ocaml-tools-2007.06.24/debian/rules 2009-11-06 09:48:13.000000000 +0000 +++ ocaml-tools-20090719/debian/rules 2009-11-06 09:48:13.000000000 +0000 @@ -1,10 +1,6 @@ #!/usr/bin/make -f # debian/rules for ocaml-tools -#export DH_VERBOSE=1 - -#OCAMLABI := $(shell ocamlc -version) - DESTDIR := $(CURDIR)/debian/ocaml-tools # top level dir for documentation @@ -19,10 +15,16 @@ OMLETSRC = $(shell echo omlet-*) build: + $(MAKE) -C ocaml-autoconf/ + cp ocaml-autoconf/README ocaml-autoconf/README.ocaml-autoconf + cd omlet-* && (cp README README.omlet ; cp ChangeLog changelog.omlet) clean: dh_testdir dh_testroot + $(MAKE) -C ocaml-autoconf/ clean + rm -f ocaml-autoconf/README.ocaml-autoconf + rm -f omlet-*/README.omlet omlet-*/changelog.omlet dh_clean install: @@ -30,28 +32,18 @@ dh_testroot dh_clean -k dh_installdirs - - # autoconf - cp autoconf/configure.in $(DESTDIR)/$(SHDIR) - cp autoconf/Makefile.in $(DESTDIR)/$(SHDIR) - - # omlet BASE=$(DESTDIR)/$(VIMDIR) make -C $(OMLETSRC) install-aux - cp debian/vim-omlet.yaml $(DESTDIR)/usr/share/vim/registry - cp $(OMLETSRC)/README $(DESTDIR)/$(DOCDIR)/README.omlet - cp $(OMLETSRC)/ChangeLog $(DESTDIR)/$(DOCDIR)/changelog.omlet - - cp debian/lintian-overrides \ - debian/ocaml-tools/usr/share/lintian/overrides/ocaml-tools binary-arch: build install binary-indep: build install dh_testdir dh_testroot + dh_install dh_installdocs dh_installchangelogs - dh_installdebconf + dh_installman + dh_lintian dh_link dh_compress dh_fixperms diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/ocaml-autoconf/LICENSE /tmp/OFl0q2nd8h/ocaml-tools-20090719/ocaml-autoconf/LICENSE --- ocaml-tools-2007.06.24/ocaml-autoconf/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/ocaml-autoconf/LICENSE 2009-07-19 16:16:39.000000000 +0100 @@ -0,0 +1,28 @@ +Copyright © 2009 Richard W.M. Jones +Copyright © 2009 Stefano Zacchiroli +Copyright © 2000-2005 Olivier Andrieu +Copyright © 2000-2005 Jean-Christophe Filliâtre +Copyright © 2000-2005 Georges Mariano + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. +* The names of the contributors may not be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/ocaml-autoconf/Makefile /tmp/OFl0q2nd8h/ocaml-tools-20090719/ocaml-autoconf/Makefile --- ocaml-tools-2007.06.24/ocaml-autoconf/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/ocaml-autoconf/Makefile 2009-07-19 16:16:39.000000000 +0100 @@ -0,0 +1,51 @@ +PACKAGE = ocaml-autoconf +VERSION = 1.0 + +prefix = /usr/local +datadir = $(prefix)/share +mandir = $(datadir)/man + +INSTALL = install +MKDIR_P = mkdir -p + +all: man ocaml.m4.txt +doc: man ocaml.m4.txt ocaml.m4.html + +man: ocaml.m4.1 + +ocaml.m4.1: ocaml.m4.pod + pod2man -c "Autoconf macros" --release "$(PACKAGE)-$(VERSION)" $< > $@ + +ocaml.m4.txt: ocaml.m4.pod + pod2text $< > $@ + +ocaml.m4.html: ocaml.m4.pod + pod2html $< > $@ + +clean: + rm -f *~ ocaml.m4.1 ocaml.m4.txt + +dist: ocaml.m4.1 ocaml.m4.txt + rm -rf $(PACKAGE)-$(VERSION) + mkdir $(PACKAGE)-$(VERSION) + install -m 0644 \ + LICENSE README \ + Makefile \ + ocaml.m4 \ + ocaml.m4.1 ocaml.m4.pod ocaml.m4.txt \ + $(PACKAGE)-$(VERSION)/ + tar -cf - $(PACKAGE)-$(VERSION) | \ + gzip --best > $(PACKAGE)-$(VERSION).tar.gz + rm -rf $(PACKAGE)-$(VERSION) + +install: install-macro install-man + +install-macro: + $(MKDIR_P) $(DESTDIR)$(datadir)/aclocal/ + $(INSTALL) -m 0644 ocaml.m4 $(DESTDIR)$(datadir)/aclocal/ + +install-man: + $(MKDIR_P) $(DESTDIR)$(mandir)/man1/ + $(INSTALL) -m 0644 ocaml.m4.1 $(DESTDIR)$(mandir)/man1/ + +.PHONY: man install-macro install-man diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/ocaml-autoconf/ocaml.m4 /tmp/OFl0q2nd8h/ocaml-tools-20090719/ocaml-autoconf/ocaml.m4 --- ocaml-tools-2007.06.24/ocaml-autoconf/ocaml.m4 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/ocaml-autoconf/ocaml.m4 2009-07-19 16:16:39.000000000 +0100 @@ -0,0 +1,240 @@ +dnl autoconf macros for OCaml +dnl +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_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.]) + OCAMLOPT=no + else + OCAMLBEST=opt + fi + 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.]) + else + OCAMLC=$OCAMLCDOTOPT + fi + 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]) +]) + + +AC_DEFUN([AC_PROG_OCAMLLEX], +[dnl + # 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 + fi + AC_SUBST([OCAMLLEX]) +]) + +AC_DEFUN([AC_PROG_OCAMLYACC], +[dnl + AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no]) + AC_SUBST([OCAMLYACC]) +]) + + +AC_DEFUN([AC_PROG_CAMLP4], +[dnl + 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]) +]) + + +AC_DEFUN([AC_PROG_FINDLIB], +[dnl + AC_REQUIRE([AC_PROG_OCAML])dnl + + # checking for ocamlfind + AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no]) + AC_SUBST([OCAMLFIND]) +]) + + +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])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])) +]) + + +AC_DEFUN([AC_CHECK_OCAML_MODULE], +[dnl + AC_MSG_CHECKING([for OCaml module $2]) + + cat > 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 + 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 < conftest.ml < is a file containing standard, useful autoconf macros for +detecting the OCaml, findlib, OCaml packages, and so on in your +autoconf-generated ./configure scripts. + +To begin using these macros, you will need to copy the C +file (usually located at C) to the +autoconf macros directory in your project. Normally this is the +C directory in your project, but the directory can be changed +using the C directive. If you have just +created the C directory, then you may also need to do: + + aclocal -I m4 + +You can then add any of the macros described below to your +C (or C). Almost every OCaml project +should use C first and probably C +right after it. + +This manual page does not describe how to use autoconf. For that you +should read the detailed autoconf info file (C). + +=head1 AC_PROG_OCAML + +This macro detects which tools of the usual OCaml toolchain are +available. It defines and substitutes the following variables: + + OCAMLC set to the name of the bytecode compiler + (eg. "ocamlc" or "ocamlc.opt"), or "no" if + no OCaml installation was found + OCAMLOPT the name of the native-code compiler, eg. "ocamlopt", + "ocamlopt.opt" or "no" + OCAMLBEST "byte" (if only the bytecode compiler is available) + or "opt" (if both bytecode and native code compilers + are available) + OCAMLDEP the name of the dependency resolver, eg. "ocamldep" + OCAMLMKTOP the name of ocamlmktop + OCAMLMKLIB the name of ocamlmklib + OCAMLDOC the name of ocamldoc + OCAMLBUILD the name of ocamlbuild + OCAMLLIB the OCaml library path (eg. C) + OCAMLVERSION the compiler version (eg. C<3.11.0>) + +=head2 Detecting if OCaml is installed + +Unlike old versions of these macros, C does I exit +if no OCaml installation is detected. Therefore if you want to detect +if OCaml is installed you have to do something like this: + + AC_PROG_OCAML + if test "$OCAMLC" = "no"; then + AC_MSG_ERROR([You must install the OCaml compiler]) + fi + +This behaviour and usage pattern are consistent with other macros of +the C) family. + +=head2 Cross-compiling + +If the configure script is invoked for cross-compiling then +C will detect the cross-compiler versions of the OCaml +compiler, eg. C etc. This happens +automatically, and for most purposes you don't need to worry about it. + +=head1 AC_PROG_FINDLIB + +This macro checks for the presence of the ocamlfind program (part of +findlib). It defines and substitutes C to the name of the +ocamlfind program, or C if not found. + +Note that this macro does not fail if ocamlfind is not found. If you +want to force the user to install findlib, you should do: + + AC_PROG_FINDLIB + if test "$OCAMLFIND" = "no"; then + AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)]) + fi + +See also C. + +=head1 AC_PROG_OCAMLLEX + +This checks for the ocamllex program and sets C to the name +of the program (eg. C or C), or C if not +found. + +=head1 AC_PROG_OCAMLYACC + +This checks for the ocamlyacc program and sets C to the +name of the program, or C if not found. + +=head1 AC_PROG_CAMLP4 + +This checks for camlp4, and checks that the version matches the +compiler version found previously. It sets C to the name of +the basic camlp4 program, or C if not found. + +The macro also checks for other tools of the camlp4 suite like +camlp4o, camlp4orf, etc. For each of them, a fully capitalized +variable is set to the tool name (or C if not found); all variable +are substituted for when filling .in files. The full list of tools and +respective variable names is as follows: + + camlp4 CAMLP4 + camlp4boot CAMLP4BOOT + camlp4o CAMLP4O + camlp4of CAMLP4OF + camlp4oof CAMLP4OOF + camlp4orf CAMLP4ORF + camlp4prof CAMLP4PROF + camlp4r CAMLP4R + camlp4rf CAMLP4RF + +=head1 AC_CHECK_OCAML_PKG + +This is the main macro that can be used to detect the presence of +OCaml findlib packages. This macro uses ocamlfind to look up findlib +packages (and thus requires that findlib itself has been installed, +and that the package has been properly packaged with a META file etc.) +If you want to find an OCaml findlib package which hasn't been +installed with findlib then you should try using +C instead. + + AC_CHECK_OCAML_PKG([name]) + +checks for an OCaml findlib package with the given name. If found, it +defines and substitutes the variable C where the +C part is substituted for the package name by replacing all +dashes with underscores. + +For example, + + AC_CHECK_OCAML_PKG([xml-light]) + +will set C to either C or C. + +To have the configure script fail if a package is not installed, do: + + AC_CHECK_OCAML_PKG([foo]) + if test "$OCAML_PKG_foo" = "no"; then + AC_MSG_ERROR([Please install OCaml findlib module 'foo'.]) + fi + +In your Makefile.in, use the substitution variable in conjunction with +ocamlfind, eg: + + .ml.cmo: + $(OCAMLFIND) ocamlc -package @OCAML_PKG_foo@ -c $< -o $@ + +Note that also in the substitution variable dashes are replaced with +underscores. + +=head2 Checking for alternative findlib package names + +In the (unlikely) case where the same library corresponds to different +findlib package names on different systems, you can improve +portability by checking for the alternative names passing a second +argument to C: + + AC_CHECK_OCAML_PKG(PKGNAME,ALTERNATIVE-NAMES) + +The behaviour is the same as before if C is found. Otherwise +all names in C are tested in turn as findlib +package names. If one is found, it is set as the value set by the +macro and substituted in .in files; otherwise C is set. + +Note that the variable name is determined by C, while the +value depends on the actual alternative name found. + +For example, to detect the camlzip findlib package, either called +C or C, and to store the found value in the +C variable you can do in your configure.ac: + + AC_CHECK_OCAML_PKG(zip,camlzip) + +and have a portable Makefile.in build line such as: + + .ml.cmo: + $(OCAMLFIND) ocamlc -package @OCAML_PKG_zip@ -c $< -o $@ + +=head1 AC_CHECK_OCAML_MODULE(VARIABLE,NAME,MODULE,INCLUDE-PATHS) + +C is the hairier alternative to +C. You should always use C +and ocamlfind/findlib if possible. + +The parameters are: + +=over + +=item VARIABLE + +This is the environment variable that is set. It will either be set +to the include path, or to C if the module was not found. + +=item NAME + +This is the name of the module we are looking for. This parameter is +just used for printing messages, and does not affect how the module is +found. + +=item MODULE + +This should be an OCaml module name, representing the module name +being looked up. You can put sub-modules here, eg. +C + +=item INCLUDE-PATHS + +This is the default list of include directories to search, eg. +C<+calendar> + +=back + +For example, the following code will check for the OCaml Calendar +module, and will distinguish between version 1 and version 2 of this +module (which have incompatible APIs). + + AC_CHECK_OCAML_PKG(calendar) + AC_CHECK_OCAML_MODULE(is_calendar2,calendar,[CalendarLib.Date],[+calendar]) + +After the above code has run, variables C and +C will be set as follows: + + OCAML_PKG_calendar is_calendar2 Result + + yes +calendar Calendar v2 is installed + yes no Calendar v1 is installed + no no No Calendar module installed + +=head1 AC_CHECK_OCAML_WORD_SIZE + +This checks the word size of the OCaml compiler, and sets +C to either C<32> or C<64>. + +=head1 SEE ALSO + +L, +L, +L + +=head1 FILES + +=over + +=item * + +/usr/share/aclocal/ocaml.m4 + +=back + +=head1 AUTHORS + +Various people have contributed to these macros over many years: + +=over + +=item * + +Olivier Andrieu + +=item * + +Jean-Christophe Filliâtre + +=item * + +Richard W.M. Jones + +=item * + +Georges Mariano + +=item * + +Jim Meyering + +=item * + +Stefano Zacchiroli + +=back + +=head1 LICENSE + + Copyright © 2009 Richard W.M. Jones + Copyright © 2009 Stefano Zacchiroli + Copyright © 2000-2005 Olivier Andrieu + Copyright © 2000-2005 Jean-Christophe Filliâtre + Copyright © 2000-2005 Georges Mariano + + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The names of the contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=head1 REPORTING BUGS + +Please report bugs to the authors at the project page: +L, using the +forge bug tracker L. diff -Nru /tmp/NABB4oLc90/ocaml-tools-2007.06.24/ocaml-autoconf/README /tmp/OFl0q2nd8h/ocaml-tools-20090719/ocaml-autoconf/README --- ocaml-tools-2007.06.24/ocaml-autoconf/README 1970-01-01 01:00:00.000000000 +0100 +++ ocaml-tools-20090719/ocaml-autoconf/README 2009-07-19 16:16:39.000000000 +0100 @@ -0,0 +1,38 @@ +This archive contains standard, useful autoconf macros for detecting +OCaml, findlib, OCaml packages, etc. + +http://forge.ocamlcore.org/projects/ocaml-autoconf/ + +Authors +---------------------------------------------------------------------- + +* Olivier Andrieu +* Jean-Christophe Filliâtre +* Richard W.M. Jones +* Georges Mariano +* Stefano Zacchiroli + +Requirements +---------------------------------------------------------------------- + +To build the manual page, you'll need 'perldoc' (part of Perl). + +Building +---------------------------------------------------------------------- + +To build the manual page, etc., do: + + make + +To install the manual page and macro centrally, do: + + make install + +Using +---------------------------------------------------------------------- + +Copy ocaml.m4 into the autoconf macros directory (usually m4/) of your +project. Read the ocaml.m4 manual page for the details of how to use +the macros. + + man ocaml.m4