From 23227116cb3e5646d1bd8f222ca2145022af2dbb Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 24 Mar 2021 02:17:29 +0200 Subject: [PATCH 31/31] Fix build on non-ELF platforms Update lib-prefix.m4 from gnulib upstream to fix regression brought in by earlier update. The new serial is 19, we had 17. See osdn #41843 Signed-off-by: Marko Lindqvist --- m4/lib-prefix.m4 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index c8a0b464c2..3c94db0acb 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ -# lib-prefix.m4 serial 17 -dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. +# lib-prefix.m4 serial 19 +dnl Copyright (C) 2001-2005, 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -180,8 +180,8 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], ], [gl_cv_elf=yes], [gl_cv_elf=no]) - ]) - if test $gl_cv_elf; then + ]) + if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then @@ -198,20 +198,23 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], echo } fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) -- 2.30.2