summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2023-03-05 13:09:34 +0100
committerMark Wielaard <mark@klomp.org>2023-03-05 13:09:34 +0100
commita9834d7df68afde4ee44ee8fef888cf7e799171a (patch)
tree05b8440868b14f7595ab545e72606da569eb6f89
parented688a59b4d4f5ccf6ef15244e5a9139f71769a3 (diff)
downloadelfutils-a9834d7df68afde4ee44ee8fef888cf7e799171a.tar.gz
configure.ac contains Bashisms
Autoconf scripts are supposed to be written in POSIX-compatible shell language. elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9 and 3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to configure.ac that cause errors when /bin/sh is not Bash. Example error when /bin/sh is Dash: ./configure: 8748: test: xyes: unexpected operator The cause of the error is the use of a non-existent == operator in expressions passed to the 'test' built-in command. POSIX shell specifies only an = operator for testing string equality. * configure.ac: Replace == by = in use_msan and enable_demangler comparisons. https://sourceware.org/bugzilla/show_bug.cgi?id=30196 Reported-by: Matt Whitlock <sourceware@mattwhitlock.name> Signed-off-by: Mark Wielaard <mark@klomp.org>
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 6e881fa0..4b67c844 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,7 +169,7 @@ if test "$use_msan" = yes; then
CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins -D_FORTIFY_SOURCE=0"
LDFLAGS="-shared"
AC_LINK_IFELSE([AC_LANG_SOURCE([int main (int argc, char **argv) { return 0; }])], use_msan=yes, use_msan=no)
- AS_IF([test "x$use_msan" == xyes],
+ AS_IF([test "x$use_msan" = xyes],
ac_cv_zdefs=no NO_UNDEFINED=,
AC_MSG_WARN([clang memory sanitizer not available])
CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS")
@@ -493,7 +493,7 @@ AC_ARG_ENABLE([demangler],
AS_HELP_STRING([--disable-demangler],
[Disable libstdc++ demangle support]),
[], [enable_demangler=yes])
-AS_IF([test "x$enable_demangler" == xyes],
+AS_IF([test "x$enable_demangler" = xyes],
AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes")