Skip to content

Commit fee9b7c

Browse files
committed
Add configure warning to check for bison version >= 1.875.
1 parent df1f5d6 commit fee9b7c

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

configure

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4424,6 +4424,19 @@ fi
44244424
test -n "$YACC" && break
44254425
done
44264426
4427+
4428+
if test "$YACC"; then
4429+
if bison --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4430+
{ echo "$as_me:$LINENO: WARNING:
4431+
*** The installed version of Bison is too old. PostgreSQL needs
4432+
*** Bison version 1.875 or later." >&5
4433+
echo "$as_me: WARNING:
4434+
*** The installed version of Bison is too old. PostgreSQL needs
4435+
*** Bison version 1.875 or later." >&2;}
4436+
unset YACC
4437+
fi
4438+
fi
4439+
44274440
if test -z "$YACC"; then
44284441
{ echo "$as_me:$LINENO: WARNING:
44294442
*** Without Bison you will not be able to build PostgreSQL from CVS or

configure.in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.254 2003/05/27 16:36:50 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.255 2003/06/06 19:11:55 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -585,6 +585,16 @@ AC_PATH_PROG(TAR, tar)
585585
PGAC_CHECK_STRIP
586586

587587
AC_CHECK_PROGS(YACC, ['bison -y'])
588+
589+
if test "$YACC"; then
590+
if bison --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
591+
AC_MSG_WARN([
592+
*** The installed version of Bison is too old. PostgreSQL needs
593+
*** Bison version 1.875 or later.])
594+
unset YACC
595+
fi
596+
fi
597+
588598
if test -z "$YACC"; then
589599
AC_MSG_WARN([
590600
*** Without Bison you will not be able to build PostgreSQL from CVS or

0 commit comments

Comments
 (0)