diff --git a/configure b/configure
index 973c9ebf5540616e6d581c4a0137f5a09396c79d..d7b0d7553b24dc0c81632fd0d799a949763af876 100755
--- a/configure
+++ b/configure
@@ -3081,7 +3081,7 @@ echo "${ECHO_T}no" >&6
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-elif test ${CC} = "xlc"; then
+elif test x"${CC}" = x"xlc"; then
   # AIX xlc has to have strict aliasing turned off too
   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
diff --git a/configure.in b/configure.in
index 7031f7d380aef75ad8c966a54219aa63a60eedb1..7a1598832ebf902d6a2cf8a0fb716d46e8a245e9 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.470 2006/07/27 13:20:24 momjian Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.471 2006/08/04 15:16:14 tgl Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -284,7 +284,7 @@ choke me
 
   # Disable strict-aliasing rules; needed for gcc 3.3+
   PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
-elif test ${CC} = "xlc"; then
+elif test x"${CC}" = x"xlc"; then
   # AIX xlc has to have strict aliasing turned off too
   PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
 fi