Commit bdef2bf2 authored by Tom Lane's avatar Tom Lane

Adjust configure's handling of libedit to not look for a history.h file.

Per Bob Friesenhahn's report, this file is not supplied by some versions
of libedit, and even when it is supplied it seems to be just a link to
readline.h, so we don't need to include it anyway.
Also, ensure that we won't try to use a too-old version of Bison.
The previous coding would bleat but then use it anyway; better to invoke
the 'missing' script if any grammar files need to be rebuilt.
parent 6fa875d7
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.479 2006/10/03 22:18:22 tgl Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.480 2006/10/04 22:31:13 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
......@@ -594,25 +594,28 @@ AC_PROG_RANLIB
AC_PATH_PROG(TAR, tar)
PGAC_CHECK_STRIP
AC_CHECK_PROGS(YACC, ['bison -y'])
if test "$YACC"; then
if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
AC_MSG_WARN([
*** If you are going to modify the grammar files or build from CVS, the installed
*** version of Bison is too old. Bison version 1.875 or later is required.])
if test -z "$YACC"; then
AC_CHECK_PROGS(YACC, ['bison -y'])
if test "$YACC"; then
if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
AC_MSG_WARN([
*** The installed version of Bison is too old to use with PostgreSQL.
*** Bison version 1.875 or later is required.])
YACC=""
fi
fi
fi
if test -z "$YACC"; then
AC_MSG_WARN([
*** Without Bison you will not be able to build PostgreSQL from CVS or
if test -z "$YACC"; then
AC_MSG_WARN([
*** Without Bison you will not be able to build PostgreSQL from CVS nor
*** change any of the parser definition files. You can obtain Bison from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Bison
*** PostgreSQL then you do not need to worry about this, because the Bison
*** output is pre-generated.) To use a different yacc program (possible,
*** but not recommended), set the environment variable YACC before running
*** 'configure'.])
fi
fi
AC_SUBST(YFLAGS)
......@@ -753,13 +756,10 @@ if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
If you have libedit already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable libedit support.])])])])
AC_CHECK_HEADERS(editline/history.h, [],
[AC_CHECK_HEADERS(history.h, [],
[AC_CHECK_HEADERS(readline/history.h, [],
[AC_MSG_ERROR([history header not found
If you have libedit already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable libedit support.])])])])
# Note: in a libedit installation, history.h is normally a dummy, and may
# not be there at all. The functions are declared in readline.h instead.
# To avoid including incompatible headers when both libraries are present,
# assume we do not need history.h.
fi
if test "$with_zlib" = yes; then
......
......@@ -101,9 +101,6 @@
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
/* Define to 1 if you have the <editline/history.h> header file. */
#undef HAVE_EDITLINE_HISTORY_H
/* Define to 1 if you have the <editline/readline.h> header file. */
#undef HAVE_EDITLINE_READLINE_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment