Bison uses "/usr/bin/perl" or "perl" in several places, and it does
not appear to be a problem. But, at least to make it simpler to
change PERL on the make command line, check for perl in configure.
* configure.ac (PERL): New.
* doc/Doxyfile.in, doc/local.mk, examples/local.mk,
* tests/bison.in: Use it.
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
supports -g, otherwise to "".])
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
supports -g, otherwise to "".])
+AC_PATH_PROG([PERL], [perl])
+if test -z "$PERL"; then
+ AC_MSG_ERROR([perl not found])
+fi
AM_MISSING_PROG([HELP2MAN], [help2man])
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_SUBST([XSLTPROC])
AM_MISSING_PROG([HELP2MAN], [help2man])
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_SUBST([XSLTPROC])
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
-PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
$(AM_V_GEN){ test ! -f $@ || cat $@; } >$@~
$(AM_V_at)test ! -f $@.tmp || rm -f $@.tmp
$(AM_V_at)src/bison$(EXEEXT) --help | \
$(AM_V_GEN){ test ! -f $@ || cat $@; } >$@~
$(AM_V_at)test ! -f $@.tmp || rm -f $@.tmp
$(AM_V_at)src/bison$(EXEEXT) --help | \
- perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
+ $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
$(AM_V_at)diff -u $@~ $@.tmp || true
$(AM_V_at)mv $@.tmp $@
MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
$(AM_V_at)diff -u $@~ $@.tmp || true
$(AM_V_at)mv $@.tmp $@
MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI)
edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
+ -e 's,@PERL\@,$(PERL),g' \
-e 's,@top_builddir\@,$(top_builddir),g' \
-e 's,@top_srcdir\@,$(top_srcdir),g'
-e 's,@top_builddir\@,$(top_builddir),g' \
-e 's,@top_srcdir\@,$(top_srcdir),g'
doc = $(top_srcdir)/doc/bison.texinfo
extexi = $(top_srcdir)/examples/extexi
doc = $(top_srcdir)/doc/bison.texinfo
extexi = $(top_srcdir)/examples/extexi
extract = VERSION="$(VERSION)" $(PERL) -f $(extexi) $(doc) --
extracted =
CLEANFILES += $(extracted) examples/extracted.stamp
extract = VERSION="$(VERSION)" $(PERL) -f $(extexi) $(doc) --
extracted =
CLEANFILES += $(extracted) examples/extracted.stamp
abs_top_srcdir='@abs_top_srcdir@'
abs_top_builddir='@abs_top_builddir@'
abs_top_srcdir='@abs_top_srcdir@'
abs_top_builddir='@abs_top_builddir@'
# Use the shipped files, not those installed.
BISON_PKGDATADIR=$abs_top_srcdir/data
# Use the shipped files, not those installed.
BISON_PKGDATADIR=$abs_top_srcdir/data
do
case $i in
*/src/parse-gram.y)
do
case $i in
*/src/parse-gram.y)
if $PERL --version >/dev/null; then
# We are called by ylwrap which still uses y.tab.*, and
# post-processes the synclines on y.tab.c itself. Don't let it
if $PERL --version >/dev/null; then
# We are called by ylwrap which still uses y.tab.*, and
# post-processes the synclines on y.tab.c itself. Don't let it