]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
configure.ac: fix bashism in dead code removal check (#2117)
authorSam James <sam@cmpct.info>
Wed, 10 Apr 2024 03:15:17 +0000 (04:15 +0100)
committerGitHub <noreply@github.com>
Wed, 10 Apr 2024 03:15:17 +0000 (20:15 -0700)
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>
configure.ac

index 82bdf230f51136cb5d60702098c4b9ff8639bd10..3cf5f50e781f2278716ce23e5e2410bf7ba50a25 100644 (file)
@@ -662,7 +662,7 @@ AC_LINK_IFELSE(
         DEAD_CODE_REMOVAL="";])
 LDFLAGS=$save_LDFLAGS
 
-if test "$DEAD_CODE_REMOVAL" == ""; then
+if test "$DEAD_CODE_REMOVAL" = ""; then
     # Macos linkers have a -dead_strip flag, which is similar to --gc-sections.
     save_LDFLAGS=$LDFLAGS
     LDFLAGS="$LDFLAGS -Wl,-dead_strip"