diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2018-01-06 14:45:01 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2018-01-06 14:45:01 +0100 |
| commit | 142182514b84ee233bc27e574df2ca2074291525 (patch) | |
| tree | ea4aead4afa3d368bec4df12e162f71fd48d3389 | |
| parent | f396611776e7ed6f1a070569a338ad56461b099e (diff) | |
build: Detect broken 'equal?' in Guile 2.2.1.
Fixes <https://bugs.gnu.org/29903>.
Reported by Mathieu Lirzin <mthl@gnu.org>.
* m4/guix.m4 (GUIX_ASSERT_SYNTAX_OBJECT_EQUAL): New macro.
* configure.ac: Use it.
| -rw-r--r-- | configure.ac | 4 | ||||
| -rw-r--r-- | m4/guix.m4 | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index aa70f140d32..53efa4a6849 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -113,6 +113,10 @@ AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "xyes"]) | |||
| 113 | dnl Make sure we have a full-fledged Guile. | 113 | dnl Make sure we have a full-fledged Guile. |
| 114 | GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads]) | 114 | GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads]) |
| 115 | 115 | ||
| 116 | dnl Make sure we don't suffer from the bug in 'equal?' wrt. syntax objects | ||
| 117 | dnl found in 2.2.1. See <https://bugs.gnu.org/29903>. | ||
| 118 | GUIX_ASSERT_SYNTAX_OBJECT_EQUAL | ||
| 119 | |||
| 116 | dnl Decompressors, for use by the substituter and other modules. | 120 | dnl Decompressors, for use by the substituter and other modules. |
| 117 | AC_PATH_PROG([GZIP], [gzip]) | 121 | AC_PATH_PROG([GZIP], [gzip]) |
| 118 | AC_PATH_PROG([BZIP2], [bzip2]) | 122 | AC_PATH_PROG([BZIP2], [bzip2]) |
diff --git a/m4/guix.m4 b/m4/guix.m4 index add57f52623..721285b0149 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | dnl GNU Guix --- Functional package management for GNU | 1 | dnl GNU Guix --- Functional package management for GNU |
| 2 | dnl Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> | 2 | dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org> |
| 3 | dnl Copyright © 2014 Mark H Weaver <mhw@netris.org> | 3 | dnl Copyright © 2014 Mark H Weaver <mhw@netris.org> |
| 4 | dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> | 4 | dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
| 5 | dnl | 5 | dnl |
| @@ -153,6 +153,26 @@ AC_DEFUN([GUIX_CHECK_UNBUFFERED_CBIP], [ | |||
| 153 | fi]) | 153 | fi]) |
| 154 | ]) | 154 | ]) |
| 155 | 155 | ||
| 156 | dnl GUIX_ASSERT_SYNTAX_OBJECT_EQUAL | ||
| 157 | dnl | ||
| 158 | dnl Guile 2.2.1 was a brown-paper-bag release where 'equal?' wouldn't work | ||
| 159 | dnl for syntax objects, which broke gexps. Unfortunately Fedora 25 provides it. | ||
| 160 | dnl Reject it. | ||
| 161 | AC_DEFUN([GUIX_ASSERT_SYNTAX_OBJECT_EQUAL], [ | ||
| 162 | AC_CACHE_CHECK([whether 'equal?' works for syntax objects], | ||
| 163 | [ac_cv_guix_syntax_object_equal], | ||
| 164 | [if "$GUILE" -c '(exit (equal? (syntax x) (syntax x)))' | ||
| 165 | then | ||
| 166 | ac_cv_guix_syntax_object_equal=yes | ||
| 167 | else | ||
| 168 | ac_cv_guix_syntax_object_equal=no | ||
| 169 | fi]) | ||
| 170 | if test "x$ac_cv_guix_syntax_object_equal" != xyes; then | ||
| 171 | # This bug was present in Guile 2.2.1 only. | ||
| 172 | AC_MSG_ERROR(['equal?' does not work for syntax object; upgrade to Guile 2.2.2 or later.]) | ||
| 173 | fi | ||
| 174 | ]) | ||
| 175 | |||
| 156 | dnl GUIX_CHECK_GUILE_SSH | 176 | dnl GUIX_CHECK_GUILE_SSH |
| 157 | dnl | 177 | dnl |
| 158 | dnl Check whether a recent-enough Guile-SSH is available. | 178 | dnl Check whether a recent-enough Guile-SSH is available. |
