aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2020-01-18 20:34:55 -0800
committerPaul Eggert2020-01-18 20:55:09 -0800
commit52baaca152135e3b67edb13df392ae9047af015c (patch)
treea62b50b45ff3b2254468a596198575fd45276ad8
parent0e577923956e0025ad764f5ced76d5f4e1a9e904 (diff)
downloademacs-52baaca152135e3b67edb13df392ae9047af015c.tar.gz
emacs-52baaca152135e3b67edb13df392ae9047af015c.zip
Update from Gnulib
This incorporates: 2020-01-18 Rename ~~gnulib.m4 to zzgnulib.m4 2020-01-18 Fix "m4_require: circular dependency of AC_LANG_COMPILER(C)" 2020-01-18 Ensure Automake does not drop ~~gnulib.m4 2020-01-18 Fix major regression from 2020-01-10 * m4/00gnulib.m4, m4/gnulib-common.m4: Copy from Gnulib. * m4/gnulib-comp.m4: Regenerate. * m4/zzgnulib.m4: New file, from Gnulib.
-rw-r--r--m4/00gnulib.m451
-rw-r--r--m4/gnulib-common.m43
-rw-r--r--m4/gnulib-comp.m41
-rw-r--r--m4/zzgnulib.m423
4 files changed, 56 insertions, 22 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index 58bc4efb9c5..06eff4f3863 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,4 +1,4 @@
1# 00gnulib.m4 serial 5 1# 00gnulib.m4 serial 7
2dnl Copyright (C) 2009-2020 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -48,24 +48,34 @@ m4_version_prereq([2.63.263], [],
48# mode. As of clang 9.0, these "known" functions are identified through 48# mode. As of clang 9.0, these "known" functions are identified through
49# LIBBUILTIN invocations in the LLVM source file 49# LIBBUILTIN invocations in the LLVM source file
50# llvm/tools/clang/include/clang/Basic/Builtins.def. 50# llvm/tools/clang/include/clang/Basic/Builtins.def.
51# It's not possible to AC_REQUIRE the extra tests from AC_CHECK_DECL,
52# because AC_CHECK_DECL, like other Autoconf built-ins, is not supposed
53# to AC_REQUIRE anything: some configure.ac files have their first
54# AC_CHECK_DECL executed conditionally. Therefore append the extra tests
55# to AC_PROG_CC.
51AC_DEFUN([gl_COMPILER_CLANG], 56AC_DEFUN([gl_COMPILER_CLANG],
52[ 57[
53 AC_REQUIRE([AC_PROG_CC]) 58dnl AC_REQUIRE([AC_PROG_CC])
54 AC_CACHE_CHECK([whether the compiler is clang], 59 AC_CACHE_CHECK([whether the compiler is clang],
55 [gl_cv_compiler_clang], 60 [gl_cv_compiler_clang],
56 [AC_EGREP_CPP([barfbarf],[ 61 [dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error
57#ifdef __clang__ 62 dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has
58barfbarf 63 dnl not yet been invoked.
59#endif 64 _AC_COMPILE_IFELSE(
60 ], 65 [AC_LANG_PROGRAM([[
61 [gl_cv_compiler_clang=yes], 66 #ifdef __clang__
62 [gl_cv_compiler_clang=no]) 67 barfbarf
68 #endif
69 ]],[[]])
70 ],
71 [gl_cv_compiler_clang=no],
72 [gl_cv_compiler_clang=yes])
63 ]) 73 ])
64]) 74])
65AC_DEFUN_ONCE([gl_COMPILER_PREPARE_CHECK_DECL], 75AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],
66[ 76[
67 AC_REQUIRE([AC_PROG_CC]) 77dnl AC_REQUIRE([AC_PROG_CC])
68 AC_REQUIRE([gl_COMPILER_CLANG]) 78dnl AC_REQUIRE([gl_COMPILER_CLANG])
69 AC_CACHE_CHECK([for compiler option needed when checking for declarations], 79 AC_CACHE_CHECK([for compiler option needed when checking for declarations],
70 [gl_cv_compiler_check_decl_option], 80 [gl_cv_compiler_check_decl_option],
71 [if test $gl_cv_compiler_clang = yes; then 81 [if test $gl_cv_compiler_clang = yes; then
@@ -73,7 +83,9 @@ AC_DEFUN_ONCE([gl_COMPILER_PREPARE_CHECK_DECL],
73 dnl '-Werror=implicit-function-declaration'. 83 dnl '-Werror=implicit-function-declaration'.
74 save_ac_compile="$ac_compile" 84 save_ac_compile="$ac_compile"
75 ac_compile="$ac_compile -Werror=implicit-function-declaration" 85 ac_compile="$ac_compile -Werror=implicit-function-declaration"
76 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])], 86 dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
87 dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
88 _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
77 [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'], 89 [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
78 [gl_cv_compiler_check_decl_option=none]) 90 [gl_cv_compiler_check_decl_option=none])
79 ac_compile="$save_ac_compile" 91 ac_compile="$save_ac_compile"
@@ -88,18 +100,15 @@ AC_DEFUN_ONCE([gl_COMPILER_PREPARE_CHECK_DECL],
88 fi 100 fi
89]) 101])
90dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl 102dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
91dnl instead of ac_compile. 103dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
104dnl in zzgnulib.m4 is inactive, use the original ac_compile.
92m4_define([_AC_CHECK_DECL_BODY], 105m4_define([_AC_CHECK_DECL_BODY],
93[ ac_save_ac_compile="$ac_compile" 106[ ac_save_ac_compile="$ac_compile"
94 ac_compile="$ac_compile_for_check_decl"] 107 if test -n "$ac_compile_for_check_decl"; then
108 ac_compile="$ac_compile_for_check_decl"
109 fi]
95m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile" 110m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
96]) 111])
97 ])
98dnl Redefine AC_CHECK_DECL so that it starts with an invocation of
99dnl gl_COMPILER_PREPARE_CHECK_DECL.
100m4_define([AC_CHECK_DECL],
101 [gl_COMPILER_PREPARE_CHECK_DECL dnl
102]m4_defn([AC_CHECK_DECL]))
103 112
104# gl_00GNULIB 113# gl_00GNULIB
105# ----------- 114# -----------
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 6c4cad6cef4..276ed1affa5 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
1# gnulib-common.m4 serial 46 1# gnulib-common.m4 serial 47
2dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@ AC_DEFUN([gl_COMMON], [
12 dnl Use AC_REQUIRE here, so that the code is expanded once only. 12 dnl Use AC_REQUIRE here, so that the code is expanded once only.
13 AC_REQUIRE([gl_00GNULIB]) 13 AC_REQUIRE([gl_00GNULIB])
14 AC_REQUIRE([gl_COMMON_BODY]) 14 AC_REQUIRE([gl_COMMON_BODY])
15 AC_REQUIRE([gl_ZZGNULIB])
15]) 16])
16AC_DEFUN([gl_COMMON_BODY], [ 17AC_DEFUN([gl_COMMON_BODY], [
17 AH_VERBATIM([_Noreturn], 18 AH_VERBATIM([_Noreturn],
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index abaca719024..cb3b89dd72f 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1159,4 +1159,5 @@ AC_DEFUN([gl_FILE_LIST], [
1159 m4/warnings.m4 1159 m4/warnings.m4
1160 m4/wchar_t.m4 1160 m4/wchar_t.m4
1161 m4/wint_t.m4 1161 m4/wint_t.m4
1162 m4/zzgnulib.m4
1162]) 1163])
diff --git a/m4/zzgnulib.m4 b/m4/zzgnulib.m4
new file mode 100644
index 00000000000..98fa68f51a6
--- /dev/null
+++ b/m4/zzgnulib.m4
@@ -0,0 +1,23 @@
1# zzgnulib.m4 serial 1
2dnl Copyright (C) 2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl This file must be named something that sorts after all other
8dnl package- or gnulib-provided .m4 files - at least for those packages
9dnl that redefine AC_PROG_CC.
10
11dnl Redefine AC_PROG_CC so that it ends with invocations of gl_COMPILER_CLANG
12dnl and gl_COMPILER_PREPARE_CHECK_DECL.
13m4_define([AC_PROG_CC],
14 m4_defn([AC_PROG_CC])[
15gl_COMPILER_CLANG
16gl_COMPILER_PREPARE_CHECK_DECL
17])
18
19# gl_ZZGNULIB
20# -----------
21# Witness macro that this file has been included. Needed to force
22# Automake to include this file after all other gnulib .m4 files.
23AC_DEFUN([gl_ZZGNULIB])