Description: Fix bashism in configure script
Bug-Debian: https://bugs.debian.org/998787
Author: Andreas Tille <tille@debian.org>
Last-Update: Sun, 07 Nov 2021 21:43:07 +0100

--- a/configure.ac
+++ b/configure.ac
@@ -123,10 +123,10 @@ AC_COPYRIGHT([
 ******************************************************************************/
 ])
 
-AS_IF([test x"$CFLAGS" == "x"], [CFLAGS=""])
-AS_IF([test x"$CPPFLAGS" == "x"], [CPPFLAGS=""])
-AS_IF([test x"$CXXFLAGS" == "x"], [CXXFLAGS=""])
-AS_IF([test x"$LDFLAGS" == "x"], [LDFLAGS=""])
+AS_IF([test x"$CFLAGS" = "x"], [CFLAGS=""])
+AS_IF([test x"$CPPFLAGS" = "x"], [CPPFLAGS=""])
+AS_IF([test x"$CXXFLAGS" = "x"], [CXXFLAGS=""])
+AS_IF([test x"$LDFLAGS" = "x"], [LDFLAGS=""])
 
 AC_CONFIG_AUX_DIR([config])
 
@@ -232,12 +232,12 @@ AC_ARG_WITH([libGkArrays-prefix],
             [with_libGkArrays_prefix=""])
 
 dnl Check if we need included GkArrays library.
-AS_IF([test "x$with_included_GkArrays" == "xcheck"],
+AS_IF([test "x$with_included_GkArrays" = "xcheck"],
       [AS_IF([test "x$with_libGkArrays_prefix" != "x"],
              [with_included_GkArrays="no"],
              [with_included_GkArrays="yes"])])
 
-AS_IF([test "x$with_included_GkArrays" == "xyes"],
+AS_IF([test "x$with_included_GkArrays" = "xyes"],
       [AS_IF([test "x$with_libGkArrays_prefix" != "x"],
              [AC_MSG_FAILURE([You can't use both --with-included-GkArrays and --with-libGkArrays-prefix options])])])
 
@@ -257,12 +257,12 @@ AC_ARG_WITH([libjellyfish-prefix],
             [with_libjellyfish_prefix=""])
 
 dnl Check if we need included jellyfish library.
-AS_IF([test "x$with_included_jellyfish" == "xcheck"],
+AS_IF([test "x$with_included_jellyfish" = "xcheck"],
       [AS_IF([test "x$with_libjellyfish_prefix" != "x"],
              [with_included_jellyfish="no"],
              [with_included_jellyfish="yes"])])
 
-AS_IF([test "x$with_included_jellyfish" == "xyes"],
+AS_IF([test "x$with_included_jellyfish" = "xyes"],
       [AS_IF([test "x$with_libjellyfish_prefix" != "x"],
              [AC_MSG_FAILURE([You can't use both --with-included-jellyfish and --with-libjellyfish-prefix options])])])
 
@@ -284,12 +284,12 @@ AC_ARG_WITH([libProgressBar-prefix],
 dnl Check if we need included ProgressBar library.
 PKG_CHECK_MODULES([PROGRESSBAR],[libProgressBar])
 PB_OK=0
-AS_IF([test "x$with_included_ProgressBar" == "xcheck"],
+AS_IF([test "x$with_included_ProgressBar" = "xcheck"],
       [AS_IF([test "x$with_libProgressBar_prefix" != "x"],
              [with_included_ProgressBar="no"],
              [with_included_ProgressBar="$with_included_GkArrays"])])
 
-AS_IF([test "x$with_included_ProgressBar" == "xyes"],
+AS_IF([test "x$with_included_ProgressBar" = "xyes"],
       [AS_IF([test "x$with_libProgressBar_prefix" != "x"],
              [AC_MSG_FAILURE([You can't use both --with-included-ProgressBar and --with-libProgressBar-prefix options])],
              [AS_IF([test "x$with_included_GkArrays" != "xyes"],
@@ -305,10 +305,10 @@ AS_IF([test "x$with_included_ProgressBar
                            [PB_OK=1
                             ProgressBar_LIBS=-lProgressBar])])]) dnl Override the default behavior of AC_CHECK_LIB (we don't want -lProgressBar in LIBS).
 
-AS_IF([test "$PB_OK" == "1"], [AC_DEFINE([HAVE_LIBPROGRESSBAR], [1], [Define to 1 in order to Use libProgressBar])])
+AS_IF([test "$PB_OK" = "1"], [AC_DEFINE([HAVE_LIBPROGRESSBAR], [1], [Define to 1 in order to Use libProgressBar])])
 
 dnl Set INCLUDED_PROGRESSBAR conditionnal for automake
-AM_CONDITIONAL([INCLUDED_PROGRESSBAR], [test "x$with_included_ProgressBar" == "xyes"])
+AM_CONDITIONAL([INCLUDED_PROGRESSBAR], [test "x$with_included_ProgressBar" = "xyes"])
 
 AC_CHECK_LIB([z], [gzread], ,
              [AC_MSG_ERROR([zlib not found, see http://www.zlib.net])])
@@ -327,7 +327,7 @@ AS_IF([test "x$with_included_GkArrays" !
 
 HAS_READ_INDEX=0
 
-AS_IF([test "$GK_OK" == "1"], 
+AS_IF([test "$GK_OK" = "1"], 
       [AC_DEFINE([HAVE_LIBGKARRAYS],
                  [1],
                  [Define to 1 in order to Use libGkArrays])
@@ -342,7 +342,7 @@ AS_IF([test "x$with_included_jellyfish"
                     [JF_OK=0])],
       [AC_CONFIG_SUBDIRS([src/libJellyfish-2.0])])
 
-AS_IF([test "$JF_OK" == "1"], 
+AS_IF([test "$JF_OK" = "1"], 
       [AC_DEFINE([HAVE_LIBJELLYFISH],
                  [1],
                  [Define to 1 in order to Use libjellyfish-2.0])
@@ -350,22 +350,22 @@ AS_IF([test "$JF_OK" == "1"],
       [AC_MSG_WARN([Library jellyfish-2.0 not found])])
 
 dnl Check if we have at least on read index
-AS_IF([test "$HAS_READ_INDEX" == "0"], [AC_MSG_FAILURE([No read index library found, please use included libraries])])
+AS_IF([test "$HAS_READ_INDEX" = "0"], [AC_MSG_FAILURE([No read index library found, please use included libraries])])
 
 
 dnl Set INCLUDED_GKARRAYS conditionnal for automake
-AM_CONDITIONAL([INCLUDED_GKARRAYS], [test "x$with_included_GkArrays" == xyes])
-AM_CONDITIONAL([HAVE_LIBGKARRAYS], [test "$GK_OK" == "1"])
+AM_CONDITIONAL([INCLUDED_GKARRAYS], [test "x$with_included_GkArrays" = xyes])
+AM_CONDITIONAL([HAVE_LIBGKARRAYS], [test "$GK_OK" = "1"])
 
 dnl Set INCLUDED_JELLYFISH conditionnal for automake
-AM_CONDITIONAL([INCLUDED_JELLYFISH], [test "x$with_included_jellyfish" == xyes])
-AM_CONDITIONAL([HAVE_LIBJELLYFISH], [test "$JF_OK" == "1"])
+AM_CONDITIONAL([INCLUDED_JELLYFISH], [test "x$with_included_jellyfish" = xyes])
+AM_CONDITIONAL([HAVE_LIBJELLYFISH], [test "$JF_OK" = "1"])
 
 dnl Forward options given to current configure script to libGkArrays configure script if needed
-AS_IF([test "x$enable_shared" == "xyes" ],
+AS_IF([test "x$enable_shared" = "xyes" ],
       [AS_VAR_APPEND([ac_configure_args], [" --enable-shared"])],
       [AS_VAR_APPEND([ac_configure_args], [" --disable-shared"])])
-AS_IF([test "x$enable_static" == "xyes" ],
+AS_IF([test "x$enable_static" = "xyes" ],
       [LDFLAGS="$LDFLAGS -all-static"
        AS_VAR_APPEND([ac_configure_args], [" --enable-static"])],
       [AS_VAR_APPEND([ac_configure_args], [" --disable-static"])])
