diff --git a/ChangeLog b/ChangeLog
index 0a5fba7866fdf474eefb9faf058df59eb4f26fff..b1346ef035646b049d08257ee54b3e49614a792e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,6 +100,10 @@ CVS code -
   total_update()
 	- Simplify to call clearok(TRUE) and wrefresh() on edit, which
 	  updates the entire screen in fewer function calls. (DLR)
+- configure.ac:
+	- Minor tweaks to some of the test blocks to avoid XSI:isms.
+	  (DLR, adapted from a Debian patch for GNU ed by David
+	  Weinehall)
 - THANKS:
 	- Add new translators to the credits.
 
diff --git a/configure.ac b/configure.ac
index 6e3f3ad7000cb2c9bbeaa799df2c87b1db6e0af1..ff34477ecb80a73ad6a7102d77d557c66fafe434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,7 +402,7 @@ if test x$enable_utf8 != xno; then
     AC_CHECK_FUNCS(iswalnum mblen mbtowc wctomb wcwidth iswspace iswblank)
 fi
 
-if test x$ac_cv_func_snprintf = xno -o x$ac_cv_func_vsnprintf = xno; then
+if test x$ac_cv_func_snprintf = xno || test x$ac_cv_func_vsnprintf = xno; then
     AM_PATH_GLIB_2_0(2.0.0,,
 	AC_MSG_ERROR([
 *** snprintf() and/or vsnprintf() not found.  GLIB 2.x not found either.
@@ -470,13 +470,13 @@ if test "x$GLIB_LIBS" != "x"; then
 fi
 
 if test x$enable_utf8 != xno && \
-   test x$CURSES_LIB_WIDE = xyes -a \
-        x$ac_cv_func_iswalnum = xyes -a \
-        x$ac_cv_func_mblen = xyes -a \
-        x$ac_cv_func_mbtowc = xyes -a \
-        x$ac_cv_func_wctomb = xyes -a \
-        x$ac_cv_func_wcwidth = xyes && \
-   test x$ac_cv_func_iswspace = xyes -o x$ac_cv_func_iswblank = xyes; then
+   test x$CURSES_LIB_WIDE = xyes && \
+   test x$ac_cv_func_iswalnum = xyes && \
+   test x$ac_cv_func_mblen = xyes && \
+   test x$ac_cv_func_mbtowc = xyes && \
+   test x$ac_cv_func_wctomb = xyes && \
+   test x$ac_cv_func_wcwidth = xyes && \
+   (test x$ac_cv_func_iswspace = xyes || test x$ac_cv_func_iswblank = xyes); then
 	AC_DEFINE(NANO_WIDE, 1, [Define this if your system has sufficient wide character support (a wide curses library, iswalnum(), iswspace() or iswblank(), mblen(), mbtowc(), wctomb(), and wcwidth()).])
 else
     if test x$enable_utf8 = xyes; then