From 185a7cd2767e3ed805aae1cca3ca440b161c4fc6 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 26 Jul 2007 13:05:47 +0000 Subject: [PATCH] unput test. git-svn-id: file:///svn/unbound/trunk@458 be551aaa-1e26-0410-a405-d3ace91eadb9 --- Makefile.in | 2 +- configure.ac | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index a6c11ca81..ada1c6c31 100644 --- a/Makefile.in +++ b/Makefile.in @@ -118,7 +118,7 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h $(INFO) Lex $< @if test ! -d util; then $(INSTALL) -d util; fi $Qecho "#include \"util/configyyrename.h\"" > $@ - $Q$(LEX) -i -t $< >> $@ + $Q$(LEX) -t $< >> $@ util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y $(INFO) Yacc $< diff --git a/configure.ac b/configure.ac index 523cf2de9..61680f309 100644 --- a/configure.ac +++ b/configure.ac @@ -336,6 +336,26 @@ cv_msgiovlen_type="int" ], AC_MSG_RESULT($cv_msgiovlen_type) AC_DEFINE_UNQUOTED([TYPE_MSGIOVLEN], $cv_msgiovlen_type, [Define to 'int' or type of struct msghdr.msg_iovlen.]) +# Check for yyunput +AC_DEFUN([CHECK_YYUNPUT], +[AC_MSG_CHECKING(whether lex can not generate yyunput) +AC_CACHE_VAL(ac_cv_c_yy_unput, +[ac_cv_c_yy_unput=no +if $LEX --nounput -h 2>&1 | grep "do not generate" 2>&1 >/dev/null; then + ac_cv_c_yy_unput="yes" +else + ac_cv_c_yy_unput="no" +fi +]) + +AC_MSG_RESULT($ac_cv_c_yy_unput) +if test $ac_cv_c_yy_unput = yes; then + LEX="$LEX --nounput" +fi +])dnl + +CHECK_YYUNPUT + # Checks for libraries. AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], [enable SSL (will check /usr/local/ssl -- 2.47.2