1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Fix readline/libedit selection code to prefer readline over libedit

reliably (ie, regardless of which libraries they depend on).  Also
make sure that we don't select headers that obviously belong to the
wrong one of the two libraries.  This was discussed back around 4-Sep
but seems to have slipped through the cracks.  The header selection
could be checked more closely, perhaps, but let's see if this is good
enough.
This commit is contained in:
Tom Lane
2004-11-30 06:13:04 +00:00
parent c3df447a03
commit aef2d0d86c
3 changed files with 510 additions and 248 deletions

View File

@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.386 2004/11/22 03:06:35 pgsql Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.387 2004/11/30 06:13:04 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -714,21 +714,34 @@ AC_CHECK_HEADERS(netinet/tcp.h, [], [],
#endif
])
if test "$with_readline" = yes; then
if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
AC_CHECK_HEADERS(readline/readline.h, [],
[AC_CHECK_HEADERS(editline/readline.h, [],
[AC_CHECK_HEADERS(readline.h, [],
[AC_MSG_ERROR([readline header not found
[AC_CHECK_HEADERS(readline.h, [],
[AC_MSG_ERROR([readline header not found
If you have readline 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 readline support.])])])])
Use --without-readline to disable readline support.])])])
AC_CHECK_HEADERS(readline/history.h, [],
[AC_CHECK_HEADERS(editline/history.h, [],
[AC_CHECK_HEADERS(history.h, [],
[AC_MSG_ERROR([history header not found
[AC_CHECK_HEADERS(history.h, [],
[AC_MSG_ERROR([history header not found
If you have readline 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 readline support.])])])])
Use --without-readline to disable readline support.])])])
fi
if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
AC_CHECK_HEADERS(editline/readline.h, [],
[AC_CHECK_HEADERS(readline.h, [],
[AC_MSG_ERROR([readline 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.])])])
AC_CHECK_HEADERS(editline/history.h, [],
[AC_CHECK_HEADERS(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.])])])
fi
if test "$with_zlib" = yes; then