diff --git a/src/configure.in b/src/configure.in
index 187452222e373f5981082ebbdd65586b61907aa9..d08fbc9befcf736b365e8495eef377c368ae04b4 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -552,7 +552,7 @@ AC_SUBST(BACKSLASH_C)
 
 AC_PROG_LEX
 if test "$LEX" = "flex"; then
-        $LEX --version 2> /dev/null | grep -s '2\.5\.3' >& /dev/null
+        $LEX --version 2> /dev/null | grep -s '2\.5\.3' > /dev/null 2>&1
         if test $? -eq 0 ; then
                 AC_MSG_WARN([
 ***