]> git.pld-linux.org Git - packages/ruby.git/blame - autoconf2.70.patch
- versioned Obsoletes
[packages/ruby.git] / autoconf2.70.patch
CommitLineData
f39e7213
JP
1From fcc88da5eb162043adcba552646677d2ab5adf55 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyfox@gentoo.org>
3Date: Mon, 16 Nov 2020 08:42:15 +0000
4Subject: [PATCH] configure.ac: fix for upcoming autoconf-2.70
5
6The failure initially noticed on `autoconf-2.69d` (soon to become 2.70):
7
8```
9$ ./configure
10./configure: line 8720: syntax error near unexpected token `fi'
11./configure: line 8720: `fi'
12```
13
14Before the change generated `./configure ` snippet looked like:
15
16```
17 if ! $CC -E -xc - <<SRC >/dev/null
18then :
19
20 #if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
21 #error premature clang
22 #endif
23SRC
24 as_fn_error $? "clang version 3.0 or later is required" "$LINENO" 5
25fi
26```
27
28Note the newline that breaks here-document syntax.
29
30After the change the snippet does not use here-document.
31
32Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
33---
34 configure.ac | 15 ++++++++-------
35 1 file changed, 8 insertions(+), 7 deletions(-)
36
37diff --git a/configure.ac b/configure.ac
38index a5e3dc76f6f5..4e4a52f066d6 100644
39--- a/configure.ac
40+++ b/configure.ac
41@@ -271,13 +271,14 @@ AS_CASE(["$host_os:$build_os"],
42 # clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported)
43 # Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn)
44 # Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
45- AS_IF([! $CC -E -xc - <<SRC >/dev/null], [
46- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
47- @%:@error premature clang
48- @%:@endif
49-SRC
50- AC_MSG_ERROR([clang version 3.0 or later is required])
51- ])
52+ AC_PREPROC_IFELSE(
53+ [AC_LANG_PROGRAM([
54+ @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
55+ @%:@error premature clang
56+ @%:@endif
57+ ])],
58+ [],
59+ [AC_MSG_ERROR([clang version 3.0 or later is required])])
60 ])
61 AS_IF([test x"${build}" != x"${host}"], [
62 AC_CHECK_TOOL(CC, gcc)
This page took 0.176727 seconds and 4 git commands to generate.