[PATCH] configure.ac: avoid bash-specific '==' comparison

5 views
Skip to first unread message

Sergei Trofimovich

unread,
May 2, 2021, 5:46:05 PM5/2/21
to isl-dev...@googlegroups.com, Matt Whitlock
From: Matt Whitlock <gen...@mattwhitlock.name>

Bug: https://bugs.gentoo.org/786564
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3f5c7b3d..f082ed40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,8 +83,8 @@ AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int = ximath-32)
AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)

AM_CONDITIONAL(HAVE_CXX11, test "x$HAVE_CXX11" = "x1")
-AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" == "ximath-32")
-AS_IF([test "x$with_int" == "ximath-32"], [
+AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" = "ximath-32")
+AS_IF([test "x$with_int" = "ximath-32"], [
AC_DEFINE([USE_SMALL_INT_OPT], [], [Use small integer optimization])
])

--
2.31.1

Sven Verdoolaege

unread,
May 3, 2021, 11:51:02 AM5/3/21
to Sergei Trofimovich, isl-dev...@googlegroups.com, Matt Whitlock
On Sun, May 02, 2021 at 10:45:53PM +0100, Sergei Trofimovich wrote:
> From: Matt Whitlock <gen...@mattwhitlock.name>
>
> Bug: https://bugs.gentoo.org/786564

Thanks.

I'd still like a sign-off for consistency.
I guess it should be Matt's or both of yours.
No need to send the patch again, just let me know you agree.

skimo

Matt Whitlock

unread,
May 3, 2021, 4:09:42 PM5/3/21
to isl Development
The patch relayed by Sergei looks correct to me.

Please note that ISL also has another (unrelated) problem that also causes configure to emit an "unexpected operator" error, though that one occurs even when /bin/sh is Bash. That one is due to ISL's using an outdated/buggy version of Autoconf to generate the distributed configure script. Regenerating the script with a newer version of Autoconf eliminates the error. The fix was in http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=63e8f7ad4dd62cd1edba955d2a50d3eaaebc8eaf.

Sven Verdoolaege

unread,
May 3, 2021, 5:48:52 PM5/3/21
to Matt Whitlock, isl Development
On Mon, May 03, 2021 at 01:09:42PM -0700, Matt Whitlock wrote:
> The patch relayed by Sergei looks correct to me.
>
> Please note that ISL also has another (unrelated) problem that also causes
> configure to emit an "unexpected operator" error, though that one occurs
> even when /bin/sh is Bash. That one is due to ISL's using an outdated/buggy
> version of Autoconf to generate the distributed configure script.
> Regenerating the script with a newer version of Autoconf eliminates the
> error. The fix was in
> http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=63e8f7ad4dd62cd1edba955d2a50d3eaaebc8eaf.

I have noticed an error of the form

configure: line 5330: test: =: unary operator expected

but I couldn't immediately figure out what was wrong.
I'll try a more recent version of autoconf before the next release.

Thanks,

skimo

Sergei Trofimovich

unread,
May 5, 2021, 3:08:59 PM5/5/21
to Sven Verdoolaege, sven.ver...@gmail.com, isl-dev...@googlegroups.com, Matt Whitlock
OK with me:

Signed-off-by: Sergei Trofimovich <sly...@gentoo.org>

--

Sergei
Reply all
Reply to author
Forward
0 new messages