Guile-Lib- make check fails 2 tests against 2.1.3, pass when 2.0.12

2016-07-15 Thread David Pirotte
Heya,

I spoke too fast in the earlier first of the 11 patches emails wrt Guile-Lib I 
just
sent! :/

Note that none of the patch I sent could possibly have had an impact on
any of modules neither the test-suites, so all patches still are 
perfectly
valid afaic.

But then, after I double checked, I see it systematically fails 2 of the
test-suites while checking against 2.1.3.59-516f7:

[1] (string wrap)

...
Running test suite: -suite ---
Running test case: test-util-equivalent-to-class
Running test case: test-fill-equivalent-to-joined-lines
Running test case: test-no-collapse-ws
Running test case: test-no-word-break
test-util-equivalent-to-class: exception in test: (out-of-range "vector-ref" 
"Value
out of range: ~S" (3) (3)) test-no-collapse-ws: exception in test: (out-of-range
"vector-ref" "Value out of range: ~S" (3) (3))

4 run, 2 failed
FAIL: string.wrap.scm
...

[2] (sxml ssax)

...
Running test suite: -suite 
Running test case: test-fold
Running test case: test-fold-layout

2 run, 0 failed
PASS: sxml.fold.scm
Backtrace:
   3 (primitive-load "/usr/local/src/guile-lib/git/unit-test…")
In ice-9/eval.scm:
   191:27  2 (_ #f)
   223:20  1 (proc #)
In unknown file:
   0 (%resolve-variable (7 . use-syntax) #)

ERROR: In procedure %resolve-variable:
ERROR: Unbound variable: use-syntax
FAIL: sxml.ssax.scm
...


Note that I'm not personally using these modules, neither did I wrote any of 
them,
so it is unlikely I'll spend time to debug in the near future, please beat me on
these, thanks!


Happy Hacking,
David


pgpGUxcd1mGZ3.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 11 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 11 of 11
From 81b970434fe1dd7423e507a528f15f10366549bd Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Fri, 15 Jul 2016 19:43:29 -0300
Subject: [PATCH 11/11] Adding meta/guile-lib-1.0.pc

* meta/guile-lib-1.0.pc.in:  New file.

* .gitignore:
* Makefile.am:
* configure.ac:  Updated for the above.
---
 .gitignore   |  1 +
 Makefile.am  |  3 +++
 configure.ac | 13 -
 meta/guile-lib-1.0.pc.in | 11 +++
 4 files changed, 23 insertions(+), 5 deletions(-)
 create mode 100644 meta/guile-lib-1.0.pc.in

diff --git a/.gitignore b/.gitignore
index 76a4aba..997b789 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ build-aux
 /configure
 /install-sh
 /missing
+/meta/guile-lib-1.0.pc
 /doc/guile-library.info
 /doc/stamp-vti
 /doc/version.texi
diff --git a/Makefile.am b/Makefile.am
index 5c7ea91..286db5c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,6 +26,7 @@
 
 
 pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA=meta/guile-lib-1.0.pc
 
 SUBDIRS = 		\
 	src 		\
@@ -45,8 +46,10 @@ EXTRA_DIST = \
 	NEWS\
 	README\
 	dev-environ.in			\
+	meta/guile-lib-1.0.pc.in	\
 	$(wildcard m4/*)
 
+
 distclean-local:
 	rm -f Makefile.in
 	rm -f aclocal.m4
diff --git a/configure.ac b/configure.ac
index 710ce5a..8adf02a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,9 @@ along with Guile-Lib.  If not, see
 
 AC_PREREQ(2.69)
 
+dnl let's bump the version to x.x.x-dev while working on the devel
+dnl branch, so who ever uses it and/or run 'make dist' or 'make
+dnl distcheck' are aware it is a wip version.
 AC_INIT(
   [guile-lib],
   [0.2.3-dev],
@@ -55,11 +58,10 @@ AC_CONFIG_SRCDIR(src/md5.scm)
 AC_SUBST(ACLOCAL_FLAGS,$ACLOCAL_FLAGS)
 
 GUILE_PKG([2.2 2.0])
-dnl must be changed to 2.0.12 before to release it needs recent
-dnl stable-2.0 texinfo patches so 'make check' pass. I'm using git so
-dnl I have all these patches locally, however 2.0.11 distro would
-dnl fail.
-GUILE_PROGS([2.0.11])
+dnl although no change has been made to any module, we bumped the
+dnl dependency version to 2.0.12 [or higher], because it has texinfo
+dnl patches so 'make check' pass.
+GUILE_PROGS([2.0.12])
 GUILE_SITE_DIR
 GUILE_GLOBAL_SITE_DIR
 GUILE_SITE_CCACHE_DIR
@@ -77,6 +79,7 @@ AC_CONFIG_FILES(
   [chmod +x dev-environ])
 
 AC_CONFIG_FILES([
+  meta/guile-lib-1.0.pc
   Makefile
   src/Makefile
   doc/Makefile
diff --git a/meta/guile-lib-1.0.pc.in b/meta/guile-lib-1.0.pc.in
new file mode 100644
index 000..7bf16b4
--- /dev/null
+++ b/meta/guile-lib-1.0.pc.in
@@ -0,0 +1,11 @@
+# Package Information for pkg-config
+
+prefix=@prefix@
+module_directory=@GUILE_GLOBAL_SITE@
+
+Name: Guile-Lib
+
+Description: Guile-lib, also known as Guile-Library, is a down-scaled,
+limited-scope CPAN for Guile
+
+Version: @VERSION@
-- 
2.8.1



pgplyDr9r1Bct.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 10 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 10 of 11
From 28fb77f545e5ed1c905002562285eb645e8e8ef4 Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Thu, 14 Jul 2016 23:42:02 -0300
Subject: [PATCH 10/11] Fixing make distcheck

* doc/docs.mk: (a) adding a license header; (b) removing a double entry
  in clean-docs target; (c) adding DISTCLEANFILES; (d) removing
  $(doc)scmfiles (it was not actually used anywhere); (e) removing
  $(doc)depfiles target, instead declare 'depfiles' as a toplevel
  variable.

  Notes: (1) wrt to (e), it was the only (unportable) way I found to
  have 'make ditcheck' work. The problem of having $(depfiles) as the
  result of a target is, because the documentation is generated (there
  is no guile-library.texi files in the distribution), and due to
  both (a) the way automake determines which files must be
  generated (timestamp), IIUC, and (b) the fact that file generation
  occurs in $(builddir), all this, unconditionally leaded to a texinfo
  [and dvi, pdf, ...) error, since in the $(buiddir), none of the
  guile-library.texi dependency files (fdl and NamesConventions)
  exist. Leaving things as they were ans using TEXINFO := $(TEXINFO) -I
  ../../../doc would not work either, because that triggers an attempt
  to write in $(scrdir), which is prohibited;

  (2) this solution is unportable (it depends on GNU Make), but this is
  not the first, guile-lib already used $(addprefix), so I guess with
  this respect my patch is ok.  Of course if someone else has/knows a
  better solution, I'm all hears, ping me!

  (3) A special thank here to Colomban Wendling, aka b4n, who spent a
  couple of hours with me on irc, #autotool, to track this issue down, to
  finally conclude that, in his opinion and within the scope of his
  knowledge, there would be no way to solve this using targets.
---
 doc/docs.mk | 55 ++-
 1 file changed, 42 insertions(+), 13 deletions(-)

diff --git a/doc/docs.mk b/doc/docs.mk
index 8095b4e..4676b7f 100644
--- a/doc/docs.mk
+++ b/doc/docs.mk
@@ -1,29 +1,58 @@
+
+
+ Copyright (C) 2016 David Pirotte
+ David Pirotte 
+
+ This file is part of Guile-Lib.
+
+ Guile-Lib is free software: you can redistribute it, as a whole,
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation, either
+ version 3 of the License, or (at your option) any later version.
+
+ Each Guile-Lib module contained in Guile-Lib has its own copying
+ conditions, specified in the comments at the beginning of the
+ module's source file.
+
+ Guile-Lib is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Guile-Lib.  If not, see
+ .
+
+
+
 clean-docs:
 	rm -f $(doc).texi
 	rm -f $(doc).info
-	rm -f $(doc)scmfiles
 	rm -f html-stamp
 	rm -rf html
-	rm -f $(addprefix $(doc).,aux cp cps fn fns ky log pdf pg pg toc tp tps vr vrs)
+	rm -f $(addprefix $(doc).,aux cp cps fn fns ky log pdf pg toc tp tps vr vrs)
 	rm -rf $(doc).html
 
-EXTRA_DIST=$(doc).scm make-texinfo.scm make-html.scm docs.mk
-DISTCLEANFILES=$(doc).texi $(doc)scmfiles
+EXTRA_DIST = 			\
+	$(doc).scm		\
+	make-texinfo.scm	\
+	make-html.scm		\
+	docs.mk
+
+DISTCLEANFILES =	\
+	Makefile.in
 
-$(doc)scmfiles:
-	GUILE_AUTO_COMPILE=0  \
-	$(GUILE) --debug --use-srfi=13 -l $(srcdir)/$(doc).scm  \
-	 -c '(for-each (lambda (m) (format #t "~a.scm\n" (string-join (map symbol->string m) "/"))) (map car *modules*))' \
-	 > $@
-depfiles=$(addprefix $(top_srcdir)/src/,$(shell test ! -f $(doc)scmfiles || cat $(doc)scmfiles))
+depfiles = $(shell $(GUILE) --no-auto-compile --debug --use-srfi=13 -l $(srcdir)/$(doc).scm -c '(for-each (lambda (m) (format \#t "$(top_srcdir)/src/~a.scm " (string-join (map symbol->string m) "/"))) (map car *modules*))')
 
-$(doc).texi: $(srcdir)/$(doc).scm $(doc)scmfiles $(depfiles)
+dummy:
+	printf '$(depfiles)'
+
+$(doc).texi: $(srcdir)/$(doc).scm $(depfiles)
 	GUILE_AUTO_COMPILE=0\
 	$(top_builddir)/dev-environ $(srcdir)/make-texinfo.scm $(srcdir)/$(doc).scm >$@
 
 html-local: html-stamp $(srcdir)/$(doc).scm $(depfiles)
-html-stamp: $(scm-module-files)
+html-stamp:
 	GUILE_AUTO_COMPILE=0\
 	$(top_builddir)/dev-environ $(srcdir)/make-html.scm $(srcdir)/$(doc).scm
 	touch $@
-
-- 
2.8.1



pgpGebxXMNNjk.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 9 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 9 of 11
From 4644393e8905cace96e1792ff6bd02c265898899 Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:59:50 -0300
Subject: [PATCH 09/11] Fixing make check

* unit-tests/texinfo.serialize.scm:  Use two spaces after a dot, not one.
---
 unit-tests/texinfo.serialize.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unit-tests/texinfo.serialize.scm b/unit-tests/texinfo.serialize.scm
index 936cf01..741d469 100644
--- a/unit-tests/texinfo.serialize.scm
+++ b/unit-tests/texinfo.serialize.scm
@@ -107,7 +107,7 @@
 "@iftex 
 This is only for tex.
 
-Note. Foo.
+Note.  Foo.
 
 @end iftex
 
-- 
2.8.1



pgpY9tA5tpO3r.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 8 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 8 of 11
From 17948f8fd4d1fd7b5630e673e9d8c0ab66a19119 Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:52:33 -0300
Subject: [PATCH 08/11] Bumping doc version and copyright numbers

* doc/guile-library.scm:  Bumping doc version and copyright numbers.
---
 doc/guile-library.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guile-library.scm b/doc/guile-library.scm
index 526320f..20903e4 100644
--- a/doc/guile-library.scm
+++ b/doc/guile-library.scm
@@ -1,15 +1,15 @@
 ;; About the package
 (define *name* "Guile Library")
 (define *description* "Common modules for Guile Scheme")
-(define *version* "0.2.2")
-(define *updated* "31 January 2013")
+(define *version* "0.2.3-dev")
+(define *updated* "11 July 2016")
 (define *authors*
   '(("Andy Wingo" . "wingo at pobox.com")
 ("Richard Todd" . "richardt at vzavenue.net")))
 
 ;; Copying the documentation
 (define *copyright-holder* "Andy Wingo, Richard Todd")
-(define *years* '(2003 2004 2005 2006 2007 2010 2011))
+(define *years* '(2003 2004 2005 2006 2007 2010 2011 2016))
 (define *permissions*
   "Permission is granted to copy, distribute and/or
 modify this document under the terms of the GNU Free
-- 
2.8.1



pgpGVdnBAFP6R.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 5 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 5 of 11
From 82a13dd3e6a81879dbf7c042e3733080eb952d4d Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:38:37 -0300
Subject: [PATCH 05/11] Fixing Makefile.am

* doc/Makefile.am: Adding a license header.  Fixing
  guile_library_TEXINFOS, adding NamingConventions.texi
---
 doc/Makefile.am | 39 +++
 1 file changed, 35 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index f2f3ed6..4bc1e4b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,9 +1,40 @@
-doc=guile-library
 
+
+ Copyright (C) 2016 David Pirotte
+ David Pirotte 
+
+ This file is part of Guile-Lib.
+
+ Guile-Lib is free software: you can redistribute it, as a whole,
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation, either
+ version 3 of the License, or (at your option) any later version.
+
+ Each Guile-Lib module contained in Guile-Lib has its own copying
+ conditions, specified in the comments at the beginning of the
+ module's source file.
+
+ Guile-Lib is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Guile-Lib.  If not, see
+ .
+
+
+
+AUTOMAKE_OPTIONS = gnu
+
+doc = guile-library
 include docs.mk
 
-info_TEXINFOS=guile-library.texi
-guile_library_TEXINFOS=fdl.texi
+info_TEXINFOS = guile-library.texi
+
+guile_library_TEXINFOS =	\
+	NamingConventions.texi	\
+	fdl.texi
 
 www: html guile-library.pdf clean-www
 	find www -name 'index.scm' -print \
@@ -16,7 +47,7 @@ www: html guile-library.pdf clean-www
 	cp guile-library.pdf www/doc/
 
 www-commit: www
-	( export CVSDIR=:ext:cvs.sv.nongnu.org:/web/guile-lib; cd www; cvs -d $$CVSDIR import -m 'make www in guile-lib/docs' guile-lib gnu $(shell date "+D%Y%m%d%H%M%S"))
+	( export CVSDIR=:ext:cvs.sv.nongnu.org:/web/guile-lib; cd www; cvs -d $$CVSDIR import -m 'make www in guile-lib/docs' guile-lib gnu $$(date "+D%Y%m%d%H%M%S"))
 
 clean-www:
 	find www -name 'index.html' -print \
-- 
2.8.1



pgpiLK6GnYEfZ.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 4 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 4 of 11
From d6f82af4e61f17ac2c4e6291e31d64cf86dc834d Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:21:07 -0300
Subject: [PATCH 04/11] Updating autogen and configure

* autogen.sh: (a) removing the call to configure, printing an invitation
  to do so instead; (b) creating build-aux/config.rpath if it does not
  exists: this because we use configure.ac uses the guile.m4 GUILE_FLAGS
  macro, among others, which needs this file, not installed anymore by
  modern version of automake, iiuc, and without it, autogen raises an
  an error. For why it's needed, see the comments in m4/guile.m4.

* configure.ac: Adding a copyright; bumping prereq -> 2.69, version ->
  0.2.3-dev; let's use build-aux, m4; automake -> 1.14, serial-tests;
  checks/looks for guile 2.2, 2.0; cleaning HAVE_GUILE_COMPILE checks,
  we always have access to a compiler: in the end this wil disappear,
  but we kept and set HAVE_GUILE_COMPILE=1 still used 'en aval'; calling
  GUILE_GLOBAL_SITE_DIR and GUILE_SITE_CCACHE_DIR, we'll use them in
  Makefile.am.
---
 autogen.sh   | 13 -
 configure.ac | 89 
 2 files changed, 84 insertions(+), 18 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 9b1b118..ef75c8e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,5 +7,16 @@ set -e
 echo '@setfilename guile-library.info' > doc/guile-library.texi
 touch -d 'jan 23 1980' doc/guile-library.texi
 
+# configure.ac uses the guile.m4 GUILE_FLAGS macro, among others,
+# which needs build-aux/config.rpath which is not installed anymore by
+# modern version of automake, and without it, this script will raise
+# an error. For why it's needed, see the comments wtr in m4/guile.m4.
+if [ ! -d "build-aux" ]; then
+mkdir build-aux
+fi
+touch build-aux/config.rpath
+
 autoreconf -vif
-exec ./configure "$@"
+
+echo
+echo "Now run ./configure --prefix=/your/prefix."
diff --git a/configure.ac b/configure.ac
index d694f48..710ce5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,32 +1,87 @@
 dnl -*- Autoconf -*-
+dnl
+dnl   configuration script for Guile-Lib
+dnl   Process this file with autoconf to produce configure.
+dnl
 
-AC_INIT(guile-lib, 0.2.2)
+define(GUILE_LIB_CONFIGURE_COPYRIGHT,[[
+
+Copyright (C) 2016 David Pirotte
+David Pirotte 
+
+This file is part of Guile-Lib.
+
+Guile-Lib is free software: you can redistribute it, as a whole,
+and/or modify it under the terms of the GNU General Public
+License as published by the Free Software Foundation, either
+version 3 of the License, or (at your option) any later version.
+
+Each Guile-Lib module contained in Guile-Lib has its own copying
+conditions, specified in the comments at the beginning of the
+module's source file.
+
+Guile-Lib is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Guile-Lib.  If not, see
+.
+
+]])
+
+AC_PREREQ(2.69)
+
+AC_INIT(
+  [guile-lib],
+  [0.2.3-dev],
+  [guile-devel at gnu dor org])
+
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+
+dnl Use `serial-tests' so the output `check-guile' is not hidden
+dnl (`parallel-tests' is the default in Automake 1.13.)
+dnl `serial-tests' was introduced in Automake 1.12.
+AM_INIT_AUTOMAKE([1.14 gnu -Wall -Wno-portability -Wno-syntax \
+  color-tests serial-tests foreign])
+AM_MAINTAINER_MODE([enable])
+AM_SILENT_RULES([yes])
+
+AC_COPYRIGHT(GUILE_LIB_CONFIGURE_COPYRIGHT)
 AC_CONFIG_SRCDIR(src/md5.scm)
-AM_INIT_AUTOMAKE([1.11 gnu check-news color-tests -Wall -Wno-portability])
 
 AC_SUBST(ACLOCAL_FLAGS,$ACLOCAL_FLAGS)
 
-GUILE_PROGS
+GUILE_PKG([2.2 2.0])
+dnl must be changed to 2.0.12 before to release it needs recent
+dnl stable-2.0 texinfo patches so 'make check' pass. I'm using git so
+dnl I have all these patches locally, however 2.0.11 distro would
+dnl fail.
+GUILE_PROGS([2.0.11])
+GUILE_SITE_DIR
+GUILE_GLOBAL_SITE_DIR
+GUILE_SITE_CCACHE_DIR
 GUILE_FLAGS
 
-if $GUILE_TOOLS | grep compile 2>&1 >/dev/null; then
-   GUILE_COMPILE="$GUILE_TOOLS compile"
-   HAVE_GUILE_COMPILE=1
-else
-   GUILE_COMPILE=""
-   HAVE_GUILE_COMPILE=0
-fi
-
+dnl this should disappear
+dnl but for now we'll keep it, it's used 'en aval'
+HAVE_GUILE_COMPILE=1
+GUILE_COMPILE="guild compile"
 AC_SUBST(GUILE_COMPILE)
 AM_CONDITIONAL(HAVE_GUILE_COMPILE, test "$HAVE_GUILE_COMPILE" = 1)
 
+AC_CONFIG_FILES(
+  [dev-environ],
+  [chmod +x dev-environ])
+
 AC_CONFIG_FILES([
-Makefile
-src/Makefile
-doc/Makefile
-examples/Makefile
-unit-tests/Makefile
+  Makefile
+  src/Makefile
+  doc/Makefile
+  examples/Makefile
+  unit-tests/Makefile
 ])
-AC_CONFIG_FILES([dev-environ], [chmod +x dev-environ])
 
 AC_OUTPUT
-- 
2.8.1



pgp9ypvWORHz6.pgp

guile-lib - devel branch - patch 3 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 3 of 11
From 49ea27fdca0201998a11b820e61cc6f8bbb74b1a Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:08:05 -0300
Subject: [PATCH 03/11] Updating m4/guile.m4

* m4/guile.m4: This file has changed upstream.  We enhanced it here with
  2 macros: GUILE_GLOBAL_SITE_DIR and GUILE_SITE_CCACHE_DIR that we'll
  use for modules and go files installation.
---
 m4/guile.m4 | 321 ++--
 1 file changed, 268 insertions(+), 53 deletions(-)

diff --git a/m4/guile.m4 b/m4/guile.m4
index 1e30d50..6381b13 100644
--- a/m4/guile.m4
+++ b/m4/guile.m4
@@ -1,29 +1,34 @@
 ## Autoconf macros for working with Guile.
 ##
-##   Copyright (C) 1998,2001, 2006 Free Software Foundation, Inc.
+##   Copyright (C) 1998,2001, 2006, 2010, 2012, 2013 - 2016 Free
+##   Software Foundation, Inc.
 ##
 ## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-## 
+## modify it under the terms of the GNU Lesser General Public License
+## as published by the Free Software Foundation; either version 3 of
+## the License, or (at your option) any later version.
+##
 ## This library is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ## Lesser General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU Lesser General Public
 ## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301 USA
 
-# serial 9
+# serial 10
 
 ## Index
 ## -
 ##
+## GUILE_PKG -- find Guile development files
 ## GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
 ## GUILE_FLAGS -- set flags for compiling and linking with Guile
 ## GUILE_SITE_DIR -- find path to Guile "site" directory
+## GUILE_GLOBAL_SITE_DIR -- find path to Guile "global site" directory
+## GUILE_SITE_CCACHE_DIR -- find path to Guile "site-ccache" directory
 ## GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
 ## GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
 ## GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
@@ -37,61 +42,140 @@
 ## NOTE: Comments preceding an AC_DEFUN (starting from "Usage:") are massaged
 ## into doc/ref/autoconf-macros.texi (see Makefile.am in that directory).
 
-# GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
-#
-# Usage: GUILE_PROGS
-#
-# This macro looks for programs @code{guile}, @code{guile-config} and
-# @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and
-# @var{GUILE_TOOLS}, to their paths, respectively.  If either of the first two
-# is not found, signal error.
-#
-# The variables are marked for substitution, as by @code{AC_SUBST}.
-#
-AC_DEFUN([GUILE_PROGS],
- [AC_PATH_PROG(GUILE,guile)
-  if test "$GUILE" = "" ; then
-  AC_MSG_ERROR([guile required but not found])
+# GUILE_PKG -- find Guile development files
+#
+# Usage: GUILE_PKG([VERSIONS])
+#
+# This macro runs the @code{pkg-config} tool to find development files
+# for an available version of Guile.
+#
+# By default, this macro will search for the latest stable version of
+# Guile (e.g. 2.0), falling back to the previous stable version
+# (e.g. 1.8) if it is available.  If no guile-@var{VERSION}.pc file is
+# found, an error is signalled.  The found version is stored in
+# @var{GUILE_EFFECTIVE_VERSION}.
+#
+# If @code{GUILE_PROGS} was already invoked, this macro ensures that the
+# development files have the same effective version as the Guile
+# program.
+#
+# @var{GUILE_EFFECTIVE_VERSION} is marked for substitution, as by
+# @code{AC_SUBST}.
+#
+AC_DEFUN([GUILE_PKG],
+ [PKG_PROG_PKG_CONFIG
+  _guile_versions_to_search="m4_default([$1], [2.2 2.0])"
+  if test -n "$GUILE_EFFECTIVE_VERSION"; then
+_guile_tmp=""
+for v in $_guile_versions_to_search; do
+  if test "$v" = "$GUILE_EFFECTIVE_VERSION"; then
+_guile_tmp=$v
+  fi
+done
+if test -z "$_guile_tmp"; then
+  AC_MSG_FAILURE([searching for guile development files for versions $_guile_versions_to_search, but previously found $GUILE version $GUILE_EFFECTIVE_VERSION])
+fi
+_guile_versions_to_search=$GUILE_EFFECTIVE_VERSION
   fi
-  AC_SUBST(GUILE)
-  AC_PATH_PROG(GUILE_CONFIG,guile-config)
-  if test "$GUILE_CONFIG" = "" ; then
-  AC_MSG_ERROR([guile-config required but not found])
+  GUILE_EFFECTIVE_VERSION=""
+  _guile_errors=""
+  for v in $_guile_versions_to_search; do
+if test -z "$GUILE_EFFECTIVE_VERSION"; then
+  

guile-lib - devel branch - patch 2 of 11

2016-07-15 Thread David Pirotte
guile-lib - devel branch - patch 2 of 11
From 348842babc7e8a200e2b1baf62ac7850a54661df Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 21:03:55 -0300
Subject: [PATCH 02/11] Updating Makefile.am

* Makefile.am:  Adding a license header, completing EXTRA_DIST and
  adding a +distclean-local target.
---
 Makefile.am | 63 +++--
 1 file changed, 61 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ae6d023..5c7ea91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,64 @@
-SUBDIRS=src doc examples unit-tests
+
+
+ Copyright (C) 2016 David Pirotte
+ David Pirotte 
+
+ This file is part of Guile-Lib.
+
+ Guile-Lib is free software: you can redistribute it, as a whole,
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation, either
+ version 3 of the License, or (at your option) any later version.
+
+ Each Guile-Lib module contained in Guile-Lib has its own copying
+ conditions, specified in the comments at the beginning of the
+ module's source file.
+
+ Guile-Lib is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Guile-Lib.  If not, see
+ .
+
+
+
+pkgconfigdir=$(libdir)/pkgconfig
+
+SUBDIRS = 		\
+	src 		\
+	doc 		\
+	examples	\
+	unit-tests
 
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST=NEWS
+EXTRA_DIST = \
+	AUTHORS\
+	ChangeLog			\
+	COPYING\
+	COPYING.GPL			\
+	COPYING.LGPL			\
+	INSTALL\
+	NEWS\
+	README\
+	dev-environ.in			\
+	$(wildcard m4/*)
+
+distclean-local:
+	rm -f Makefile.in
+	rm -f aclocal.m4
+	rm -rf autom4te.cache
+	rm -rf build-aux
+	rm -f configure
+	rm -f dev-environ
+	rm -f meta/guile-lib-1.0.pc
+	rm -f *~
+	rm -f guile-lib-*.tar.gz
+	rm -f src/*~
+	rm -f src/TAGS
+	rm -f src/Makefile.in
+	rm -f examples/Makefile.in
+	rm -f unit-tests/Makefile.in
-- 
2.8.1



pgp03h4Q7nKcz.pgp
Description: OpenPGP digital signature


guile-lib - devel branch - patch 1 of 11

2016-07-15 Thread David Pirotte
Hello Guilers,

I've worked a bit on the autotool chain files of guile-lib, fixed make check, 
make
distckeck and added a meta/guile-lib-1.0.pc file.

I did not touched any of the source code modules, these are all admin patches so
to speak. I worked on this because I wanted to use pkg-config to check guile-lib
version users have [or not] installed for guile-gnome and guile-clutter...

Also, here [in the past I mean], make check and make distcheck never passed,
now they do pass, both for 2.0.12 and 2.1.3.

As usual, patch review welcome!

Note: after these patches, guile-lib will install its modules in
(%global-site-dir) [it was in $prefix/share/guile/site], and the go 
files in
(%site-ccache-dir) [their were installed next to the module files].

Unless negative feedback, I should push these within 2 weeks, merge to master 
and
release Guile-Lib 0.2.3 early august.

Thanks,
David

PS: I tried git send-email, but had a problem, I'm talking to my smtp
provider, hope next time it's all automatic :)
From fefdfca4fe6ef53aff695e2eebfda6a0515e3b81 Mon Sep 17 00:00:00 2001
From: David Pirotte 
Date: Tue, 12 Jul 2016 20:59:45 -0300
Subject: [PATCH 01/11] Fix some more dirs and files we do not track

* .gitignore:  Do not track some more dirs and files.
---
 .gitignore | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/.gitignore b/.gitignore
index 94d1d8e..76a4aba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
 .bzrignore
 Makefile
 Makefile.in
+dev-environ
+build-aux
 *.go
 /aclocal.m4
 /autom4te.cache
@@ -30,7 +32,12 @@ Makefile.in
 /doc/guile-library.tps
 /doc/guile-library.vr
 /doc/guile-library.vrs
+/doc/guile-library.dvi
+/doc/guile-library.html/
+/doc/guile-library.t2d/
+/doc/guile-library.t2p/
 /doc/guile-libraryscmfiles
+/doc/guile-librarydepfiles
 /doc/html
 /doc/html-stamp
 /doc/www/index.html
-- 
2.8.1



pgpfCkLG6_mOE.pgp
Description: OpenPGP digital signature


Compilation warnings in net_db.c

2016-07-15 Thread Eli Zaretskii
While compiling net_db.c from Guile 2.0.12 with MinGW, I get a bunch
of warnings such as this one:

   net_db.c:454:20: warning: 'sym_ai_passive' defined but not used 
[-Wunused-variable]
SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
   ^
   ../libguile/snarf.h:82:29: note: in definition of macro 'SCM_SNARF_HERE'
#  define SCM_SNARF_HERE(X) X
^
   net_db.c:454:1: note: in expansion of macro 'SCM_VARIABLE_INIT'
SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
^

AFAICT, these SCM_VARIABLE_INIT calls wind up declaring static
variables that are not used in net_db.c.  Is that what's supposed to
happen, or do I need to look more into this?  Do people get these
warnings on Posix platforms?



configure.ac needs a change for MinGW

2016-07-15 Thread Eli Zaretskii
win32-uname.[ch] were renamed in Guile 2.0.12, but configure.ac still
references them:

  case $host in
*-*-mingw*)
  AC_CHECK_HEADER(winsock2.h, [AC_DEFINE([HAVE_WINSOCK2_H], 1,
[Define if you have the  header file.])])
  AC_CHECK_LIB(ws2_32, main)
  AC_LIBOBJ([win32-uname])  <

This causes a fatal error during the build with MinGW.



MinGW-related patches that were reported in 2014 but not applied

2016-07-15 Thread Eli Zaretskii
I built Guile 2.0.12 today with MinGW, and to my chagrin found that
some of the patches I sent long ago are still not in the repository.

Below please find the list of those patches.

The stime.c patch in this message was not applied, although it causes
failures in time.test (explained in the message):

  https://lists.gnu.org/archive/html/guile-devel/2014-06/msg00012.html

The issues with dirname and basename, for which I posted a patch here:

  https://lists.gnu.org/archive/html/guile-devel/2014-07/msg00012.html

were subsequently discussed, but the code was not changed, AFAICT.

This patch is needed, because without it Guile will write corrupted
*.go files:

  https://lists.gnu.org/archive/html/guile-devel/2014-08/msg00052.html

Can these please be applied?

TIA



Re: Guile's DATAROOTDIR and DATADIR

2016-07-15 Thread Eli Zaretskii
> From: Mark H Weaver 
> Cc: guile-devel@gnu.org
> Date: Fri, 15 Jul 2016 13:25:46 -0400
> 
> Having said this, I will admit that we've not maintained perfect ABI
> compatibility within 2.0.x, e.g. we've removed some obscure interfaces
> that were intended to be kept private, or were broken and could not be
> easily fixed, and that we believed to be unused in practice.  This is
> not ideal, and I think we will need to be much more strict about this in
> the future, as Guile becomes more widely used.
> 
> In any case, to the extent that there's a problem here, the solution is
> to redouble our efforts to avoid ABI breakage.  The solution is most
> definitely *not* to have separate directories for every maintenance
> release.  The reason is that we want existing Guile programs compiled
> against 2.0.11 to benefit from the bug fixes in 2.0.12.
> 
> Does that make sense?

It make sense if it indeed works in practice.  You seem to say there
are in fact ABI incompatibilities in the 2.0.x series, and if that's
indeed true, then the only way to avoid trouble is to rebuild and
reinstall all the packages that are linked against Guile, once I
install the latest Guile.  That is unfortunate, to say the least,
since Guile is already used in important GNU packages such as GDB and
Make.

Is it possible to publish the list of ABI incompatibilities between
2.0.11 and 2.0.12 specifically?

Thanks.



Re: Patchset related to array functions

2016-07-15 Thread Mark H Weaver
Andy Wingo  writes:

>   (2) Can we use C99 in our public interface, or just internally?  If we
>   use it publically, what should we change?  No more scm_t_uint8 I
>   hope, besides for back-compat?  This patch set does not have to
>   include these changes, but we should have a plan.

Good question!  Since Emacs 25 requires C99, I think it's reasonable for
us to also require C99 *internally*, but whether we can reasonably
assume C99 in our public headers is far less clear.  Existing programs
that include  might have conflicting requirements for the C
dialect options passed to the compiler.  Even if there's no conflict,
developers may resent being asked to change their C dialect options.

Thoughts?

   Mark



Re: Guile's DATAROOTDIR and DATADIR

2016-07-15 Thread Mark H Weaver
Eli Zaretskii  writes:

> "./configure --help" says:
>
>  Fine tuning of the installation directories:
>[...]
>--datarootdir=DIR   read-only arch.-independent data root 
> [PREFIX/share]
>--datadir=DIR   read-only architecture-independent data 
> [DATAROOTDIR]
>
> AFAIU, this means PREFIX/share/guile/2.0/ is where the *.scm files
> will be installed.  That is, installing Guile 2.0.12 will overwrite
> the Scheme files that were installed there by previous Guile 2.0.x
> versions.
>
> If the above is true, then the question that bothers me is whether
> replacing these files might cause any trouble for programs that were
> compiled against previous Guile 2.0.x versions (like GDB and Make, for
> example).  If there are potential incompatibilities visible on the
> Scheme level, then I think a versioned directory under
> PREFIX/share/guile/2.0/ would be in order, so that several versions of
> Guile could live on the same system.
>
> The same issue arises with the cache directory, where the *.go files
> are installed (I have those in LIBDIR/guile/2.0/ccache/).

We are aware of these potential issues, which is why we must be careful
to ensure ABI compatibility within a stable release series, e.g. within
2.0.x.  If we accidentally break something that uses Guile within a
stable series, that's a bug.

In practice, we seem to be doing a good job of ensuring ABI
compatibility within 2.0.x, based on the lack of bug reports of this
nature.  I don't recall seeing reports of upgrades within 2.0.x causing
breakage, outside of simple bugs.

Having said this, I will admit that we've not maintained perfect ABI
compatibility within 2.0.x, e.g. we've removed some obscure interfaces
that were intended to be kept private, or were broken and could not be
easily fixed, and that we believed to be unused in practice.  This is
not ideal, and I think we will need to be much more strict about this in
the future, as Guile becomes more widely used.

In any case, to the extent that there's a problem here, the solution is
to redouble our efforts to avoid ABI breakage.  The solution is most
definitely *not* to have separate directories for every maintenance
release.  The reason is that we want existing Guile programs compiled
against 2.0.11 to benefit from the bug fixes in 2.0.12.

Does that make sense?

   Mark



Re: [PATCH] Patchset related to array functions

2016-07-15 Thread Daniel Llorens

On 14 Jul 2016, at 20:20, Andy Wingo  wrote:

> I think the concerns are:
> 
> (1) Do inlined definitions get inlined?
> (2) Are external definitions reified as well?
> (3) Do we avoid reifying definitions in each compilation unit?
> (4) Can you dlsym() an inline function?
> 
> All these answers should be yes.  No benchmarking needed, just
> inspection of the build artifacts under different configurations.

Right. I might give this a try. But IMO neither this inline issue nor the 
stdint issue nor other things that we might want to improve thanks to C99 are 
necessary to simply enable using C99 in the source. The SCM_INLINE_etc defines 
work as they are and everything else seems to be backwards compatible. The 
fixes are more likely to happen once the C99 switch has been flipped.

> Tx, will review separately.  In the future would you mind please
> spamming the list with these patches as a thread of multiple mails, as
> git-send-email would do?  That makes it easy for me to review just one
> patch, say LGTM or whatever on that patch, then work on other patches on
> other days.  But I will make an initial pass on this mail, later though
> :)

I didn't know about git-send-mail, it's neat. It should be mentioned in 
HACKING! I can resend the patches in that format, just let me know.





Re: [PATCH] Re: Patchset related to array functions

2016-07-15 Thread Chris Vine
On Thu, 14 Jul 2016 17:41:45 +0200
Daniel Llorens  wrote:
[snip]
> I think we'd want C89/C90 users to still be able to #include
> . Dunno.

libguile.h can also at present be included in C++89/03/11/14 code by
design - all the necessary "extern C" stuff is there.  I would hope
that would continue, but some C99 things, such as variable length
arrays, designated initializers, the _Complex type, the restrict
qualifier and compound literals (except in C++11/14) are not available.

There is no problem with using these in libguile implementation
(*.c) code, but including them in headers will generally stop the
headers being usable in C++ code.  Having said that, g++ happens to
accept some of these in C++ code as an extension.

Chris



Guile's DATAROOTDIR and DATADIR

2016-07-15 Thread Eli Zaretskii
"./configure --help" says:

 Fine tuning of the installation directories:
   [...]
   --datarootdir=DIR   read-only arch.-independent data root [PREFIX/share]
   --datadir=DIR   read-only architecture-independent data [DATAROOTDIR]

AFAIU, this means PREFIX/share/guile/2.0/ is where the *.scm files
will be installed.  That is, installing Guile 2.0.12 will overwrite
the Scheme files that were installed there by previous Guile 2.0.x
versions.

If the above is true, then the question that bothers me is whether
replacing these files might cause any trouble for programs that were
compiled against previous Guile 2.0.x versions (like GDB and Make, for
example).  If there are potential incompatibilities visible on the
Scheme level, then I think a versioned directory under
PREFIX/share/guile/2.0/ would be in order, so that several versions of
Guile could live on the same system.

The same issue arises with the cache directory, where the *.go files
are installed (I have those in LIBDIR/guile/2.0/ccache/).

Is there a potential problem here?

TIA



[PATCH] doc: Do not gender the programmer.

2016-07-15 Thread Ricardo Wurmus
* doc/ref/api-foreign.texi: Replace "his" with "their".
* doc/ref/sxml.texi: Likewise.
---
 doc/ref/api-foreign.texi | 2 +-
 doc/ref/sxml.texi| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/ref/api-foreign.texi b/doc/ref/api-foreign.texi
index c2c49ec..76614f0 100644
--- a/doc/ref/api-foreign.texi
+++ b/doc/ref/api-foreign.texi
@@ -52,7 +52,7 @@ automatically the next time they are run.
 
 Now, when all the necessary machinery is there to perform part of the
 linking at run-time, why not take the next step and allow the programmer
-to explicitly take advantage of it from within his program?  Of course,
+to explicitly take advantage of it from within their program?  Of course,
 many operating systems that support shared libraries do just that, and
 chances are that Guile will allow you to access this feature from within
 your Scheme programs.  As you might have guessed already, this feature
diff --git a/doc/ref/sxml.texi b/doc/ref/sxml.texi
index 17c3d01..3b940bd 100644
--- a/doc/ref/sxml.texi
+++ b/doc/ref/sxml.texi
@@ -275,7 +275,7 @@ the middle- and high-level parsers are single-threaded 
through the
 the @var{seed} in any way: they simply pass it around as an instance of
 an opaque datatype.  User functions, on the other hand, can use the seed
 to maintain user's state, to accumulate parsing results, etc.  A user
-can freely mix his own functions with those of the framework.  On the
+can freely mix their own functions with those of the framework.  On the
 other hand, the user may wish to instantiate a high-level parser:
 @code{SSAX:make-elem-parser} or @code{SSAX:make-parser}.  In the latter
 case, the user must provide functions of specific signatures, which are
-- 
2.8.4