1*a53f50b9Schristosdnl find f/lex, but error if none found 2*a53f50b9SchristosAC_DEFUN_ONCE([AMU_PROG_LEX], 3*a53f50b9Schristos[AC_CHECK_PROGS(LEX, flex lex, :) 4*a53f50b9Schristosif test -z "$LEXLIB" 5*a53f50b9Schristosthen 6*a53f50b9Schristos AC_CHECK_LIB(fl, yywrap, LEXLIB="-lfl", 7*a53f50b9Schristos [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) 8*a53f50b9Schristosfi 9*a53f50b9SchristosAC_SUBST(LEXLIB) 10*a53f50b9Schristosif test "x$LEX" != "x:"; then 11*a53f50b9Schristos _AC_PROG_LEX_YYTEXT_DECL 12*a53f50b9Schristoselse 13*a53f50b9Schristos AC_MSG_ERROR([cannot find flex/lex -- needed for am-utils]) 14*a53f50b9Schristosfi]) 15