From 887cbf6566cfbfd977f5a55c4e557e2c607f1bc3 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Mon, 13 Jun 1994 07:10:49 +0000 Subject: [PATCH] fix yylineno test to actually run lex git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3761 dc483132-0cff-0310-8789-dd5450dbe970 --- src/aclocal.m4 | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d7936fcc2..9999ab147 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -116,12 +116,6 @@ divert(0)dnl changequote([,])dnl ])dnl dnl -dnl check for yylineno -- HAVE_YYLINENO -dnl -define(HAVE_YYLINENO,[ -AC_COMPILE_CHECK([yylineno], -[extern int yylineno;], [t(&yylineno);], , AC_DEFINE(NO_YYLINENO))])dnl -dnl dnl take saved makefile stuff and put it in the Makeile dnl define(EXTRA_RULES,[ @@ -344,3 +338,19 @@ define(ISODE_INCLUDE,[ ADD_DEF([-I${SRCTOP}/isode/h -I${BUILDTOP}/isode/h])dnl ])dnl dnl +dnl check for yylineno -- HAVE_YYLINENO +dnl +define(HAVE_YYLINENO,[dnl +AC_REQUIRE_CPP()AC_REQUIRE([AC_PROG_LEX])dnl +AC_CHECKING(for yylineno declaration) +# some systems have yylineno, others don't... + echo '%% +%%' | ${LEX} -t > conftest.out + if egrep yylineno conftest.out >/dev/null 2>&1; then + : + else + AC_DEFINE([NO_YYLINENO]) + fi + rm -f conftest.out +])dnl +dnl -- 2.26.2