]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
c1c60dcf53faff6491e32aa9da92ed4854f0371c
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From dcf9bb7e3b12f3bd74edff60e80b53e668159579 Mon Sep 17 00:00:00 2001
2 From: Zack Weinberg <zackw@panix.com>
3 Date: Sun, 2 Apr 2023 10:27:08 -0400
4 Subject: [PATCH 09/29] AC_XENIX_DIR: Rewrite using AC_CANONICAL_HOST.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 AC_XENIX_DIR is an obsolete macro, defined as AC_HEADER_DIRENT plus
10 code to make absolutely sure configure scripts that depended on a
11 shell variable internal to the original (2.13 era) definition of
12 AC_XENIX_DIR are not broken by autoupdate. (That variable had the
13 temptingly public-sounding name “XENIX.”) This compatibility code
14 uses AC_EGREP_CPP, which is itself discouraged for use in new
15 configure scripts.
16
17 (N.B. codesearch.debian.net does not find any uses whatsoever of
18 this macro, nor any code in an .ac or .m4 file that depends on the
19 XENIX variable.)
20
21 Change the compatibility code to use AC_CANONICAL_HOST instead,
22 and clarify which pieces of the code inserted by autoupdate are
23 probably still necessary.
24
25 * lib/autoconf/specific.m4 (AC_XENIX_DIR): Set XENIX variable
26 based on value of host_os. Clarify what manual cleanup is
27 recommended after autoupdate replaces this obsolete macro.
28
29 Upstream-Status: Backport
30 Signed-off-by: Khem Raj <raj.khem@gmail.com>
31 ---
32 lib/autoconf/specific.m4 | 26 +++++++++++---------------
33 1 file changed, 11 insertions(+), 15 deletions(-)
34
35 diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
36 index 1b3ee661b..a2dc5d488 100644
37 --- a/lib/autoconf/specific.m4
38 +++ b/lib/autoconf/specific.m4
39 @@ -754,9 +754,9 @@ dnl it should only be defined when necessary.
40 ## Checks for UNIX variants. ##
41 ## -------------------------- ##
42
43 -
44 -# These are kludges which should be replaced by a single POSIX check.
45 -# They aren't cached, to discourage their use.
46 +# These macros are all obsolete, from the early days of Autoconf,
47 +# before the invention of AC_CANONICAL_SYSTEM. Autoupdate will
48 +# replace each with inline code for a more modern feature check.
49
50 # AC_AIX
51 # ------
52 @@ -776,19 +776,15 @@ AU_DEFUN([AC_ISC_POSIX], [AC_SEARCH_LIBS([strerror], [cposix])])
53 # AC_XENIX_DIR
54 # ------------
55 AU_DEFUN([AC_XENIX_DIR],
56 -[AC_MSG_CHECKING([for Xenix])
57 -AC_EGREP_CPP([yes],
58 -[#if defined M_XENIX && ! defined M_UNIX
59 - yes
60 -@%:@endif],
61 - [AC_MSG_RESULT([yes]); XENIX=yes],
62 - [AC_MSG_RESULT([no]); XENIX=])
63 -
64 -AC_HEADER_DIRENT[]dnl
65 +[AC_HEADER_DIRENT
66 +# Autoupdate added the next two lines to ensure that your configure
67 +# script's behavior did not change. They are safe to remove unless
68 +# you have code that depends on the XENIX shell variable.
69 +AC_CANONICAL_HOST
70 +AS_CASE([$host_os], [xenix*], [XENIX=yes], [XENIX=no])
71 +# End of code added by autoupdate
72 ],
73 -[You shouldn't need to depend upon XENIX. Remove the
74 -'AC_MSG_CHECKING', 'AC_EGREP_CPP', and this warning if this part
75 -of the test is useless.])
76 +[Check for code depending on the XENIX shell variable.])
77
78
79 # AC_DYNIX_SEQ
80 --
81 2.41.0
82