]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Check for bison, to avoid spurious errors for people who don't have it.
authorBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2001 01:07:34 +0000 (01:07 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2001 01:07:34 +0000 (01:07 +0000)
intl/ChangeLog
intl/Makefile.in
m4/ChangeLog
m4/gettext.m4

index 021bc0dfde47f9a6e5e653bd5840d35bd8e6655a..f17d55129f076a9497b3a2c6422f9234728d39d8 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-23  Bruno Haible  <haible@clisp.cons.org>
+
+       * Makefile.in (YACC): Use @INTLBISON@ instead of bison.
+
 2001-03-21  Bruno Haible  <haible@clisp.cons.org>
 
        * dcigettext.c (_nl_state_lock): Mark as #ifdef _LIBC. AIX 3 xlc
index fcc444455c0571267e5495a9597788e9ce306870..d2573dc0978f60cb342a07675e240e1a18cb4417 100644 (file)
@@ -47,7 +47,7 @@ AR = ar
 CC = @CC@
 LIBTOOL = @LIBTOOL@
 RANLIB = @RANLIB@
-YACC = bison -y -d
+YACC = @INTLBISON@ -y -d
 YFLAGS = --name-prefix=__gettext
 
 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
index 08fe49848fb69ec7466005eeae597386817f4ef8..0b3aa2d4f3b74149a2d29cf2d8d00e59ea5c44e9 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-23  Bruno Haible  <haible@clisp.cons.org>
+
+       * gettext.m4 (AM_WITH_NLS): Check for bison and set INTLBISON.
+
 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
 
        * iconv.m4 (AM_ICONV): Recommend GNU libiconv.
index 434669a4df7b4e38810658856d2149113eb2ee07..598aee30643ae157bdf332e803401bb1b996b281 100644 (file)
@@ -155,7 +155,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
        fi
       fi
 
-      # We need to process the po/ directory.
+      dnl We need to process the po/ directory.
       POSUB=po
     fi
     AC_OUTPUT_COMMANDS(
@@ -164,12 +164,43 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
       esac])
 
 
-    # If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
-    # to 'yes' because some of the testsuite requires it.
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
     if test "$PACKAGE" = gettext; then
       BUILD_INCLUDED_LIBINTL=yes
     fi
 
+    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+    dnl because plural.y uses bison specific features. It requires at least
+    dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+    dnl compile.
+    dnl bison is only needed for the maintainer (who touches plural.y). But in
+    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+    dnl the rule in general Makefile. Now, some people carelessly touch the
+    dnl files or have a broken "make" program, hence the plural.c rule will
+    dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+    dnl present or too old.
+    AC_CHECK_PROGS([INTLBISON], [bison])
+    if test -z "$INTLBISON"; then
+      ac_verc_fail=yes
+    else
+      dnl Found it, now check the version.
+      AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+      case $ac_prog_version in
+        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+      esac
+      AC_MSG_RESULT([$ac_prog_version])
+    fi
+    if test $ac_verc_fail = yes; then
+      INTLBISON=:
+    fi
+
     dnl These rules are solely for the distribution goal.  While doing this
     dnl we only have to keep exactly one list of the available catalogs
     dnl in configure.in.