I assume that you installed $FLEX , perhaps with a combination of AC_ARG_VAR and AC_PATH_PROG .
AC_CACHE_CHECK([whether $FLEX supports -R], [my_cv_prog_flex_dash_r], [mv_cv_prog_flex_dash_r=no echo '%%' | "$FLEX" -R && my_cv_prog_flex_dash_r=yes rm -f lex.yy.c]) AS_IF([test $my_cv_prog_flex_dash_r = yes], [FLEX="$FLEX -R"])
source share