aboutsummaryrefslogtreecommitdiff
path: root/intl/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'intl/configure.ac')
-rw-r--r--intl/configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/intl/configure.ac b/intl/configure.ac
index 48832b9..b110337 100644
--- a/intl/configure.ac
+++ b/intl/configure.ac
@@ -47,5 +47,28 @@ case $USE_INCLUDED_LIBINTL in
;;
esac
+BISON3_YES='#'
+BISON3_NO=
+if test "$INTLBISON" != :; then
+ ac_bison3=no
+ AC_MSG_CHECKING([bison 3 or later])
+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
+ [3-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, bison3"; ac_bison3=yes;;
+ *) ac_prog_version="$ac_prog_version, old";;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ if test $ac_bison3 = yes; then
+ AC_DEFINE(HAVE_BISON3, 1, [Define if bison 3 or later is used.])
+ BISON3_YES=
+ BISON3_NO='#'
+ fi
+fi
+AC_SUBST(BISON3_YES)
+AC_SUBST(BISON3_NO)
+
AC_CONFIG_FILES(Makefile config.intl)
AC_OUTPUT