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 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
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -594,25 +594,28 @@ AC_PROG_RANLIB ...@@ -594,25 +594,28 @@ AC_PROG_RANLIB
AC_PATH_PROG(TAR, tar) AC_PATH_PROG(TAR, tar)
PGAC_CHECK_STRIP PGAC_CHECK_STRIP
AC_CHECK_PROGS(YACC, ['bison -y']) 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 if test "$YACC"; then
AC_MSG_WARN([ if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
*** If you are going to modify the grammar files or build from CVS, the installed AC_MSG_WARN([
*** version of Bison is too old. Bison version 1.875 or later is required.]) *** The installed version of Bison is too old to use with PostgreSQL.
*** Bison version 1.875 or later is required.])
YACC=""
fi
fi fi
fi
if test -z "$YACC"; then if test -z "$YACC"; then
AC_MSG_WARN([ AC_MSG_WARN([
*** Without Bison you will not be able to build PostgreSQL from CVS or *** 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 *** change any of the parser definition files. You can obtain Bison from
*** a GNU mirror site. (If you are using the official distribution of *** 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, *** output is pre-generated.) To use a different yacc program (possible,
*** but not recommended), set the environment variable YACC before running *** but not recommended), set the environment variable YACC before running
*** 'configure'.]) *** 'configure'.])
fi
fi fi
AC_SUBST(YFLAGS) AC_SUBST(YFLAGS)
...@@ -753,13 +756,10 @@ if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then ...@@ -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 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. failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable libedit support.])])])]) Use --without-readline to disable libedit support.])])])])
AC_CHECK_HEADERS(editline/history.h, [], # Note: in a libedit installation, history.h is normally a dummy, and may
[AC_CHECK_HEADERS(history.h, [], # not be there at all. The functions are declared in readline.h instead.
[AC_CHECK_HEADERS(readline/history.h, [], # To avoid including incompatible headers when both libraries are present,
[AC_MSG_ERROR([history header not found # assume we do not need history.h.
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.])])])])
fi fi
if test "$with_zlib" = yes; then if test "$with_zlib" = yes; then
......
...@@ -101,9 +101,6 @@ ...@@ -101,9 +101,6 @@
/* Define to 1 if you have the `dlopen' function. */ /* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN #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. */ /* Define to 1 if you have the <editline/readline.h> header file. */
#undef HAVE_EDITLINE_READLINE_H #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