]> git.pld-linux.org Git - packages/ruby.git/blob - autoconf2.70.patch
updated source urls to https
[packages/ruby.git] / autoconf2.70.patch
1 From fcc88da5eb162043adcba552646677d2ab5adf55 Mon Sep 17 00:00:00 2001
2 From: Sergei Trofimovich <slyfox@gentoo.org>
3 Date: Mon, 16 Nov 2020 08:42:15 +0000
4 Subject: [PATCH] configure.ac: fix for upcoming autoconf-2.70
5
6 The 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
14 Before the change generated `./configure ` snippet looked like:
15
16 ```
17     if ! $CC -E -xc - <<SRC >/dev/null
18 then :
19
20         #if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
21         #error premature clang
22         #endif
23 SRC
24         as_fn_error $? "clang version 3.0 or later is required" "$LINENO" 5
25 fi
26 ```
27
28 Note the newline that breaks here-document syntax.
29
30 After the change the snippet does not use here-document.
31
32 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
33 ---
34  configure.ac | 15 ++++++++-------
35  1 file changed, 8 insertions(+), 7 deletions(-)
36
37 diff --git a/configure.ac b/configure.ac
38 index 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.046864 seconds and 3 git commands to generate.