From ce028cefc7bf074e46a2ccf0d6c6dc2e0b07e75b Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 28 Mar 2021 09:01:58 +0300 Subject: [PATCH] build: fix autotools build under mingw autotools that is shipped with mingw (autoconf 2.71-1, automake 1.6-1.16, automake wrapper 11-1), does not allow trailing backslashes for AC_CHECK_HEADERS() and AC_CHECK_FUNCS(), otherwise it generates incorrect for loop, and reports: ../configure: line 14724: syntax error near unexpected token `as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`' ../configure: line 14724: ` as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`' Error: Process completed with exit code 1. Here is a simple analog: for VAR in foo \ bar \ do : echo $VAR done Trailing slash is not allowed. Refs: - https://github.com/libevent/libevent/runs/2171607687 - https://github.com/libevent/libevent/runs/2211365885?check_suite_focus=true --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 305a9d21..1f1e8146 100644 --- a/configure.ac +++ b/configure.ac @@ -219,7 +219,7 @@ AC_CHECK_HEADERS([ \ sys/wait.h \ sys/random.h \ errno.h \ - afunix.h \ + afunix.h ]) case "${host_os}" in @@ -359,7 +359,7 @@ AC_CHECK_FUNCS([ \ umask \ unsetenv \ usleep \ - getrandom \ + getrandom ]) AS_IF([test x$bwin32 = xtrue], -- 2.50.1