From 1959fb04dc4608206bdcc6908ca3f0d71a43eda8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Jul 2013 11:05:19 +0200 Subject: build: Provide a replacement (srfi srfi-37) when the user's one is broken. * srfi/srfi-37.scm.in: New file, taken from Guile 2.0.9. * m4/guix.m4: New macro. * configure.ac: Use it. Define Automake conditional `INSTALL_SRFI_37'. * Makefile.am (nobase_nodist_guilemodule_DATA)[INSTALL_SRFI_37]: Add srfi/srfi-37.scm. (GOBJECTS)[INSTALL_SRFI_37]: Add srfi/srfi-37.go. (srfi/srfi-37.scm)[INSTALL_SRFI_37]: New target. (EXTRA_DIST): Add srfi/srfi-37.scm.in. --- m4/guix.m4 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'm4') diff --git a/m4/guix.m4 b/m4/guix.m4 index 477b0e4eb3..63fa00be2f 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 @@ -115,3 +115,22 @@ AC_DEFUN([GUIX_ASSERT_GUILE_FEATURES], [ fi done ]) + +dnl GUIX_CHECK_SRFI_37 +dnl +dnl Check whether SRFI-37 suffers from . +dnl This bug was fixed in Guile 2.0.9. +AC_DEFUN([GUIX_CHECK_SRFI_37], [ + AC_CACHE_CHECK([whether (srfi srfi-37) is affected by http://bugs.gnu.org/13176], + [ac_cv_guix_srfi_37_broken], + [if "$GUILE" -c "(use-modules (srfi srfi-37)) \ + (sigaction SIGALRM (lambda _ (primitive-exit 1))) \ + (alarm 1) \ + (define opts (list (option '(#\I) #f #t (lambda _ #t)))) \ + (args-fold '(\"-I\") opts (lambda _ (error)) (lambda _ #f) '())" + then + ac_cv_guix_srfi_37_broken=no + else + ac_cv_guix_srfi_37_broken=yes + fi]) +]) -- cgit v1.2.3