groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/03: Build from git: Make `configure' fail if `yacc' is not fo


From: Bertrand Garrigues
Subject: [groff] 01/03: Build from git: Make `configure' fail if `yacc' is not found.
Date: Wed, 4 Oct 2017 17:24:51 -0400 (EDT)

bgarrigues pushed a commit to branch master
in repository groff.

commit 554a95f1976f3f795653d333c7558bbcae4a69d2
Author: Bertrand Garrigues <address@hidden>
Date:   Tue Sep 12 00:49:23 2017 +0200

    Build from git: Make `configure' fail if `yacc' is not found.
    
    * m4/groff.m4 (GROFF_PROG_YACC): look for (in this order) `byacc',
    `bison -y', `yacc'.  Set `YACC' to `missing' is nothing is found
    and generate an error.  Don't generate an error if build is not
    done from git as tarball already distribute files generated by
    `yacc'.
---
 ChangeLog   | 10 ++++++++++
 m4/groff.m4 | 13 ++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 696e977..e82af30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-09-11  Bertrand Garrigues <address@hidden>
+
+       Build from git: Make `configure' fail if `yacc' is not found.
+
+       * m4/groff.m4 (GROFF_PROG_YACC): look for (in this order) `byacc',
+       `bison -y', `yacc'.  Set `YACC' to `missing' is nothing is found
+       and generate an error.  Don't generate an error if build is not
+       done from git as tarball already distribute files generated by
+       `yacc'.
+
 2017-09-02  Bertrand Garrigues <address@hidden>
 
        Fix .gitignore files for in-source build.
diff --git a/m4/groff.m4 b/m4/groff.m4
index 1f41649..062573b 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -49,11 +49,18 @@ AC_DEFUN([GROFF_PRINT],
    AC_SUBST([DVIPRINT])
    AC_MSG_RESULT([$DVIPRINT])])
 
-# Bison generated parsers have problems with C++ compilers other than g++.
-# So byacc is preferred over bison.
+
+# Bison generated parsers have problems with C++ compilers other than
+# g++.  So byacc is preferred over bison.  If no 'yacc' program is
+# available, we issue an error only if building from the source as in
+# distributed tarball files generated by 'yacc' are already present.
 
 AC_DEFUN([GROFF_PROG_YACC],
-  [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])])
+  [AC_CHECK_PROGS([YACC], [byacc 'bison -y' yacc], [missing])
+  if test "x$YACC" = "xmissing" -a -d ${srcdir}/.git; then
+    AC_MSG_ERROR([Could not find 'yacc' or 'bison'], 1)
+  fi
+  ])
 
 
 # We need Perl 5.6.1 or newer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]