summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch82
1 files changed, 0 insertions, 82 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch b/meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch
deleted file mode 100644
index 1b30d9926c..0000000000
--- a/meta/recipes-devtools/autoconf/autoconf/backports/0004-Cater-to-programs-misusing-AC_EGREP_HEADER.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 232cab527897bcdf4d55492d41af73d31905bda5 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Fri, 31 Mar 2023 10:46:20 -0700
4Subject: [PATCH 04/29] Cater to programs misusing AC_EGREP_HEADER
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Problem reported by Frederic Berat in:
10https://lists.gnu.org/archive/html/autoconf/2022-11/msg00127.html
11* lib/autoconf/programs.m4 (AC_PROG_EGREP): Also set
12EGREP_TRADITIONAL and ac_cv_path_EGREP_TRADITIONAL.
13* tests/c.at (AC_PROG_EGREP and AC_EGREP_HEADER):
14New test, taken from Frederic Berat’s email in:
15https://lists.gnu.org/r/autoconf/2023-03/msg00043.html
16
17Upstream-Status: Backport
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 lib/autoconf/programs.m4 | 10 ++++++++++
21 tests/c.at | 24 ++++++++++++++++++++++++
22 2 files changed, 34 insertions(+)
23
24diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
25index 1b7460c85..62ba6b8b6 100644
26--- a/lib/autoconf/programs.m4
27+++ b/lib/autoconf/programs.m4
28@@ -371,6 +371,16 @@ AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
29 fi])
30 EGREP="$ac_cv_path_EGREP"
31 AC_SUBST([EGREP])
32+ dnl
33+ dnl Also set EGREP_TRADITIONAL even though unnecessary here,
34+ dnl for wrong but too-common code with the following pattern:
35+ dnl AC_PROG_EGREP
36+ dnl if false; then
37+ dnl AC_EGREP_HEADER([printf], [stdio.h], [has_printf=yes])
38+ dnl fi
39+ dnl AC_EGREP_HEADER([malloc], [stdlib.h], [has_malloc=yes])
40+ EGREP_TRADITIONAL=$EGREP
41+ ac_cv_path_EGREP_TRADITIONAL=$EGREP
42 ])# AC_PROG_EGREP
43
44 # _AC_PROG_EGREP_TRADITIONAL
45diff --git a/tests/c.at b/tests/c.at
46index c37f43b10..fad54760f 100644
47--- a/tests/c.at
48+++ b/tests/c.at
49@@ -232,6 +232,30 @@ AT_CHECK_DEFINES(
50 AT_CLEANUP
51
52
53+## ----------------------------------- ##
54+## AC_PROG_EGREP and AC_EGREP_HEADER. ##
55+## ----------------------------------- ##
56+
57+AT_SETUP([AC_PROG_EGREP and AC_EGREP_HEADER])
58+
59+_AT_CHECK_AC_MACRO(
60+[[AC_PROG_CPP
61+ AC_PROG_EGREP
62+
63+ # Although this code is incorrect (it should use AS_IF),
64+ # it follows a too-common real world pattern.
65+ # For now, test for it; we may remove this test later.
66+ if false; then
67+ AC_EGREP_HEADER([^], [limits.h])
68+ fi
69+
70+ AC_EGREP_HEADER([$], [limits.h], [],
71+ [AC_MSG_ERROR([[egrep-related macros do not tolerate misuse of 'if']])])
72+]])
73+
74+AT_CLEANUP
75+
76+
77 ## ------------------------------------ ##
78 ## AC_NO_EXECUTABLES (working linker). ##
79 ## ------------------------------------ ##
80--
812.41.0
82