]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
configure.ac: fix bashisms in configure.ac
authorSam James <sam@gentoo.org>
Tue, 22 Mar 2022 17:33:09 +0000 (17:33 +0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 23 Mar 2022 01:53:43 +0000 (21:53 -0400)
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.

Fixes configure warnings/errors like:
```
checking if compiler warns about alias for function with incompatible types... yes
/var/tmp/portage/sys-libs/glibc-2.34-r10/work/glibc-2.34/configure: 4209: test: xyes: unexpected operator
```

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Sam James <sam@gentoo.org>
configure
configure.ac
sysdeps/powerpc/powerpc64/le/configure
sysdeps/powerpc/powerpc64/le/configure.ac
sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure
sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac

index 8e5bee775a651fcbaaa96ede8039ae1f049e296e..2a3cb49b0b74abebe87c979e6a08627e055a8297 100755 (executable)
--- a/configure
+++ b/configure
@@ -4232,7 +4232,7 @@ if test x"$libc_cv_gcc_indirect_function" != xyes; then
   # GCC 8+ emits a warning for alias with incompatible types and it might
   # fail to build ifunc resolvers aliases to either weak or internal
   # symbols.  Disables multiarch build in this case.
-  if test x"$libc_cv_gcc_incompatible_alias" == xyes; then
+  if test x"$libc_cv_gcc_incompatible_alias" = xyes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc emits a warning for alias between functions of incompatible types" >&5
 $as_echo "$as_me: WARNING: gcc emits a warning for alias between functions of incompatible types" >&2;}
     if test x"$multi_arch" = xyes; then
index 87f67d25ec193ef03bdec7576d5e994fb34b2200..fa7d3c025bc5522155cec1cc10bdaa3ac926deb2 100644 (file)
@@ -767,7 +767,7 @@ if test x"$libc_cv_gcc_indirect_function" != xyes; then
   # GCC 8+ emits a warning for alias with incompatible types and it might
   # fail to build ifunc resolvers aliases to either weak or internal
   # symbols.  Disables multiarch build in this case.
-  if test x"$libc_cv_gcc_incompatible_alias" == xyes; then
+  if test x"$libc_cv_gcc_incompatible_alias" = xyes; then
     AC_MSG_WARN([gcc emits a warning for alias between functions of incompatible types])
     if test x"$multi_arch" = xyes; then
       AC_MSG_ERROR([--enable-multi-arch support requires a gcc with gnu-indirect-function support])
index 35950a6ddd1771db0485798d6b6bf37f1cc84a59..395f9f730981beb8995cebb47874d4d641ea11b4 100644 (file)
@@ -113,7 +113,7 @@ CFLAGS="$save_CFLAGS"
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_powerpc64le_ldbl128_mabi" >&5
 $as_echo "$libc_cv_compiler_powerpc64le_ldbl128_mabi" >&6; }
-if test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"; then :
+if test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" = "no"; then :
   critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlong-double-128 simultaneously."
 fi
 
index 9f0423ede23bbf8a36e6cd5ec8232cca4fdf8706..48d7089b63d5dd2c84422e92d8acc4071590477e 100644 (file)
@@ -63,7 +63,7 @@ long double x;
                  [libc_cv_compiler_powerpc64le_ldbl128_mabi=yes],
                  [libc_cv_compiler_powerpc64le_ldbl128_mabi=no])
 CFLAGS="$save_CFLAGS"])
-AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"],
+AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" = "no"],
       [critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlong-double-128 simultaneously."])
 
 dnl objcopy (binutils) 2.26 or newer required to support the --update-section
index 4ca1d158338cb83ca59cee4da6189586eea96446..b95a7205498115a091f0982fc5b544500e63944f 100644 (file)
@@ -25,7 +25,7 @@ fi
 $as_echo "$libc_cv_mcpu_power10" >&6; }
 config_vars="$config_vars
 mcpu-power10 = $libc_cv_mcpu_power10"
-if test "$libc_cv_mcpu_power10" == "yes"; then :
+if test "$libc_cv_mcpu_power10" = "yes"; then :
 
        $as_echo "#define USE_PPC64_MCPU_POWER10 1" >>confdefs.h
 
index ceb578cc5913930678279dcb2be1fb608cc9b102..257ca6c1100c2ae3579fc39fe4ed22ca6dc13d68 100644 (file)
@@ -9,6 +9,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
               [libc_cv_mcpu_power10=yes],
               [libc_cv_mcpu_power10=no])])
 LIBC_CONFIG_VAR([mcpu-power10], [$libc_cv_mcpu_power10])
-AS_IF([[test "$libc_cv_mcpu_power10" == "yes"]],[
+AS_IF([[test "$libc_cv_mcpu_power10" = "yes"]],[
        AC_DEFINE(USE_PPC64_MCPU_POWER10)])
 CFLAGS="$OLD_CFLAGS"