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,[
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