Re: [PATCH] Fix configure when /bin/sh is not bash

William Cohen <[email protected]> Thu, 10 Sep 2020 16:00:29 -0400
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 9/5/20 7:40 AM, Andrew Savchenko wrote:
> When /bin/sh used by autoconf is not bash, e.g. dash, configure
> fails because it uses bash-specific equality operator "==".
>
> Fix this problem by replacing "==" with POSIX "=" which is
> sufficient for test where it is being used.
>
> Signed-off-by: Andrew Savchenko <[email protected]>
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 05609f6e..f5fcd17d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -466,8 +466,8 @@ AX_COPY_IF_CHANGE(doc/xsl/catalog-1.xml, doc/xsl/catalog.xml)
>
>  if ! test "x$enable_account_check" = "xyes"; then
>     :
> -elif test "`getent passwd oprofile 2>/dev/null`" == "" || \
> -     test "`getent group oprofile 2>/dev/null`" == ""; then
> +elif test "`getent passwd oprofile 2>/dev/null`" = "" || \
> +     test "`getent group oprofile 2>/dev/null`" = ""; then
>     if test `id -u` != "0"; then
>         echo "Warning: The user account 'oprofile:oprofile' does not exist on the system."
>         echo "         To profile JITed code, this special user account must exist."
> --
> 2.24.0
>
> Best regards,
> Andrew Savchenko


Thanks for the patch. It has been put into the oprofile master branch. -Will

>
>
> _______________________________________________
> oprofile-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oprofile-list