$NetBSD: patch-ad,v 1.1 2008/03/02 07:02:01 jlam Exp $

--- configure.orig	2007-12-17 23:38:40.000000000 -0500
+++ configure
@@ -6553,15 +6553,17 @@ fi
 if test "$LEX" = :; then
   LEX=${am_missing_run}flex
 fi
-if ! test "y$LEX" = "yflex"; then
-    if ! test "y$LEX" = "ylex"; then
+case "$LEX" in
+flex|*/flex|lex|*/lex)    
+        ;;
+*)      
         { { echo "$as_me:$LINENO: error: *** flex or lex required
 See \`config.log' for more details." >&5
 echo "$as_me: error: *** flex or lex required
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
-    fi
-fi
+        ;;
+esac
 
 # Extract the first word of "mount", so it can be a program name with args.
 set dummy mount; ac_word=$2
