|
1 |
| -# $PostgreSQL: pgsql/config/programs.m4,v 1.20 2006/05/23 19:28:45 momjian Exp $ |
| 1 | +# $PostgreSQL: pgsql/config/programs.m4,v 1.21 2007/07/19 17:15:30 tgl Exp $ |
| 2 | + |
| 3 | + |
| 4 | +# PGAC_PATH_YACC |
| 5 | +# -------------- |
| 6 | +# Look for Bison, set the output variable YACC to its path if found. |
| 7 | +# Reject versions before 1.875 (they have bugs or capacity limits). |
| 8 | +# Note we do not accept other implementations of yacc. |
| 9 | + |
| 10 | +AC_DEFUN([PGAC_PATH_YACC], |
| 11 | +[# Let the user override the search |
| 12 | +if test -z "$YACC"; then |
| 13 | + AC_CHECK_PROGS(YACC, ['bison -y']) |
| 14 | +fi |
| 15 | +
|
| 16 | +if test "$YACC"; then |
| 17 | + pgac_yacc_version=`$YACC --version 2>/dev/null | sed q` |
| 18 | + AC_MSG_NOTICE([using $pgac_yacc_version]) |
| 19 | + if echo "$pgac_yacc_version" | $AWK '{ if ([$]4 < 1.875) exit 0; else exit 1;}' |
| 20 | + then |
| 21 | + AC_MSG_WARN([ |
| 22 | +*** The installed version of Bison is too old to use with PostgreSQL. |
| 23 | +*** Bison version 1.875 or later is required.]) |
| 24 | + YACC="" |
| 25 | + fi |
| 26 | +fi |
| 27 | +
|
| 28 | +if test -z "$YACC"; then |
| 29 | + AC_MSG_WARN([ |
| 30 | +*** Without Bison you will not be able to build PostgreSQL from CVS nor |
| 31 | +*** change any of the parser definition files. You can obtain Bison from |
| 32 | +*** a GNU mirror site. (If you are using the official distribution of |
| 33 | +*** PostgreSQL then you do not need to worry about this, because the Bison |
| 34 | +*** output is pre-generated.) To use a different yacc program (possible, |
| 35 | +*** but not recommended), set the environment variable YACC before running |
| 36 | +*** 'configure'.]) |
| 37 | +fi |
| 38 | +# We don't need AC_SUBST(YACC) because AC_PATH_PROG did it |
| 39 | +AC_SUBST(YFLAGS) |
| 40 | +])# PGAC_PATH_YACC |
| 41 | + |
2 | 42 |
|
3 | 43 |
|
4 | 44 | # PGAC_PATH_FLEX
|
@@ -56,12 +96,12 @@ if test x"$pgac_cv_path_flex" = x"no"; then
|
56 | 96 | *** a GNU mirror site. (If you are using the official distribution of
|
57 | 97 | *** PostgreSQL then you do not need to worry about this because the Flex
|
58 | 98 | *** output is pre-generated.)])
|
59 |
| -fi |
60 | 99 |
|
61 |
| -if test x"$pgac_cv_path_flex" = x"no"; then |
62 | 100 | FLEX=
|
63 | 101 | else
|
64 | 102 | FLEX=$pgac_cv_path_flex
|
| 103 | + pgac_flex_version=`$FLEX -V 2>/dev/null` |
| 104 | + AC_MSG_NOTICE([using $pgac_flex_version]) |
65 | 105 | fi
|
66 | 106 |
|
67 | 107 | AC_SUBST(FLEX)
|
|
0 commit comments