From b29d62dfaf8c55b18e9c8f30322a9bcde5255cb7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 29 Dec 2020 04:00:53 +0100 Subject: [PATCH] havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS. * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In acl_is_expected_elfclass, use 'expr', not 'test'. --- ChangeLog | 6 ++++++ m4/lib-prefix.m4 | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53be43408b..d03007b3eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-12-28 Bruno Haible + + havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS. + * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In + acl_is_expected_elfclass, use 'expr', not 'test'. + 2020-12-28 Bruno Haible ptsname_r: Fix a compiler warning on Solaris. diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 28bb3d366a..2bcdfdfecc 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,4 +1,4 @@ -# lib-prefix.m4 serial 18 +# lib-prefix.m4 serial 19 dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -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.39.5