]> git.saurik.com Git - bison.git/commitdiff
build: look for Perl in configure.
authorAkim Demaille <akim@lrde.epita.fr>
Sun, 8 Apr 2012 06:58:43 +0000 (08:58 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 5 Oct 2012 07:34:52 +0000 (09:34 +0200)
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/Makefile.am, tests/bison.in: Use it.

configure.ac
doc/Doxyfile.in
doc/Makefile.am
tests/bison.in

index b9d2ea69798e4fa9fd01b665eea6c63a2e7e55e2..4cc9ef91a3c34c41f666d32fd6effd53eb8920f3 100644 (file)
@@ -123,6 +123,10 @@ AC_PROG_GNU_M4
 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])
index b5557518d640639c2a7b58d0f65528190b88da99..e36a1cee0875571aab8740679246321f71236f5d 100644 (file)
@@ -940,7 +940,7 @@ EXTERNAL_GROUPS        = YES
 # 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
+PERL_PATH              = @PERL@
 
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
index d87f00f00b8cb4cf9703e4a9404b87261dc423ae..f695e22dfecc8d70e76328a0ed87a8b7b30d4c63 100644 (file)
@@ -30,7 +30,7 @@ $(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
        $(AM_V_at)rm -f $@.tmp
        $(AM_V_at)cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
        $(AM_V_at)$(top_builddir)/src/bison --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 = $(srcdir)/cross-options.texi
index 4dfeb791ae217f1203cb44867d8c81e712e2f6e0..f21b2bcd5221bd45e4e90a6163a63ab42c4789c9 100644 (file)
@@ -19,7 +19,7 @@
 
 abs_top_srcdir='@abs_top_srcdir@'
 abs_top_builddir='@abs_top_builddir@'
-: ${PERL=perl}
+: ${PERL='@PERL@'}
 
 # Use the shipped files, not those installed.
 BISON_PKGDATADIR=$abs_top_srcdir/data