summaryrefslogtreecommitdiff
blob: 53a220fbf0de366aaa3ebb549d3338fd4fc2c97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
https://github.com/Cacti/spine/pull/245

From: Sam James <sam@gentoo.org>
Date: Fri, 10 Dec 2021 03:42:21 +0000
Subject: [PATCH] configure.ac: fix bashisms

configure needs to work with a POSIX-compliant shell so we need
to avoid bashisms like '=='. This fixes configure with e.g. /bin/sh
provided by dash.

Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -260,7 +260,7 @@ fi
   CFLAGS="-I$MYSQL_INC_DIR $CFLAGS"
 
 unamestr=$(uname)
-if test $unamestr == 'OpenBSD'; then
+if test $unamestr = 'OpenBSD'; then
   AC_CHECK_LIB(mysqlclient, mysql_init,
     [ LIBS="-lmysqlclient -lm $LIBS"
       AC_DEFINE(HAVE_MYSQL, 1, MySQL Client API)
@@ -285,8 +285,8 @@ else
     if test -f $MYSQL_LIB_DIR/libmysqlclient_r.a -o -f $MYSQL_LIB_DIR/libmysqlclient_r.$ShLib ; then
       LIBS="-lmysqlclient_r -lm -ldl $LIBS"
     else
-      if test "$HAVE_MYSQL" == "yes"; then
-        if test $unamestr == 'OpenBSD'; then
+      if test "$HAVE_MYSQL" = "yes"; then
+        if test $unamestr = 'OpenBSD'; then
           LIBS="-lmysqlclient -lm $LIBS"
         else
           LIBS="-lmysqlclient -lm -ldl $LIBS"