fix yylineno test to actually run lex
authorMark Eichin <eichin@mit.edu>
Mon, 13 Jun 1994 07:10:49 +0000 (07:10 +0000)
committerMark Eichin <eichin@mit.edu>
Mon, 13 Jun 1994 07:10:49 +0000 (07:10 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3761 dc483132-0cff-0310-8789-dd5450dbe970

src/aclocal.m4

index d7936fcc2fac141880c53bcd5d3802cb77070a1f..9999ab147820571dbab05d4966aa4aba9bf91323 100644 (file)
@@ -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