Don't use non-portable "==" in shell tests.

Use POSIX "=" instead of "==" which is not supported at least by FreeBSD
/bin/sh.

Closes #3515925.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12971 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Vadim Zeitlin 2012-04-09 20:58:10 +00:00
commit faa6be3bd9
2 changed files with 9 additions and 9 deletions

View file

@ -22,19 +22,19 @@ AC_DEFUN([AC_COMPARE_VERSION], [
isolate_b_regex='\([[0-9]]\+\).*'
for ver_part in $nodots_a ; do
b_ver_part=`echo "$ver_b" | sed -e 's/'"$isolate_b_regex"'/\1/'`
if test \( "$ver_part" -lt "$b_ver_part" \) -a \( "x$condition" == "xequal" \) ; then
if test \( "$ver_part" -lt "$b_ver_part" \) -a \( "x$condition" = "xequal" \) ; then
condition=less
elif test \( "$ver_part" -gt "$b_ver_part" \) -a \( "x$condition" == "xequal" \) ; then
elif test \( "$ver_part" -gt "$b_ver_part" \) -a \( "x$condition" = "xequal" \) ; then
condition=greater
fi
isolate_b_regex='[[0-9]]\+\.'"$isolate_b_regex"
done
if test "x$condition" == "xequal" ; then
if test "x$condition" = "xequal" ; then
[$4]
elif test "x$condition" == "xless" ; then
elif test "x$condition" = "xless" ; then
[$3]
elif test "x$condition" == "xgreater" ; then
elif test "x$condition" = "xgreater" ; then
[$5]
fi
])
])

View file

@ -110,19 +110,19 @@ AC_DEFUN([AX_PATH_GENERIC],[
])
AC_PATH_PROGS(UP[]_CONFIG,[$6 DOWN-config],[no])
AS_IF([test "$UP[]_CONFIG" == "no"],[
AS_IF([test "$UP[]_CONFIG" = "no"],[
:
$5
],[
dnl Get the CFLAGS from LIBRARY-config script
AS_IF([test x"$7" == x],[
AS_IF([test x"$7" = x],[
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
],[
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args $7`"
])
dnl Get the LIBS from LIBRARY-config script
AS_IF([test x"$8" == x],[
AS_IF([test x"$8" = x],[
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
],[
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args $8`"