summaryrefslogtreecommitdiff
blob: 7f7151c4d6bb890291ab2d3f212d1963cef6ba0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
https://github.com/osandov/drgn/pull/427

From 4aad3f174ceaaa740728ba92181d9d156f70abac Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 27 Aug 2024 21:03:42 +0100
Subject: [PATCH] libdrgn: fix bashism in M4 macro

configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.

Signed-off-by: Sam James <sam@gentoo.org>
---
 libdrgn/m4/my_c_auto.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdrgn/m4/my_c_auto.m4 b/libdrgn/m4/my_c_auto.m4
index d38c72436..30f3221b5 100644
--- a/libdrgn/m4/my_c_auto.m4
+++ b/libdrgn/m4/my_c_auto.m4
@@ -12,7 +12,7 @@ if test "x$my_cv_c_auto" != xyes; then
 	AC_CACHE_CHECK([for __auto_type], [my_cv_c___auto_type],
 		       [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[__auto_type x = 1;]])],
 					  [my_cv_c___auto_type=yes], [my_cv_c___auto_type=no])])
-	if test "x$my_cv_c___auto_type" == xyes; then
+	if test "x$my_cv_c___auto_type" = xyes; then
 		AC_DEFINE([auto], [__auto_type])
 	else
 		AC_MSG_ERROR([no auto or __auto_type])