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
6 The failure initially noticed on `autoconf-2.69d` (soon to become 2.70):
10 ./configure: line 8720: syntax error near unexpected token `fi'
11 ./configure: line 8720: `fi'
14 Before the change generated `./configure ` snippet looked like:
17 if ! $CC -E -xc - <<SRC >/dev/null
20 #if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
21 #error premature clang
24 as_fn_error $? "clang version 3.0 or later is required" "$LINENO" 5
28 Note the newline that breaks here-document syntax.
30 After the change the snippet does not use here-document.
32 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
34 configure.ac | 15 ++++++++-------
35 1 file changed, 8 insertions(+), 7 deletions(-)
37 diff --git a/configure.ac b/configure.ac
38 index a5e3dc76f6f5..4e4a52f066d6 100644
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
50 - AC_MSG_ERROR([clang version 3.0 or later is required])
54 + @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
55 + @%:@error premature clang
59 + [AC_MSG_ERROR([clang version 3.0 or later is required])])
61 AS_IF([test x"${build}" != x"${host}"], [
62 AC_CHECK_TOOL(CC, gcc)