mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -1,4 +1,4 @@
|
||||
# $PostgreSQL: pgsql/config/programs.m4,v 1.16 2004/09/02 20:39:57 tgl Exp $
|
||||
# $PostgreSQL: pgsql/config/programs.m4,v 1.17 2004/11/30 06:13:02 tgl Exp $
|
||||
|
||||
|
||||
# PGAC_PATH_FLEX
|
||||
@ -82,10 +82,10 @@ AC_MSG_CHECKING([for readline])
|
||||
|
||||
AC_CACHE_VAL([pgac_cv_check_readline],
|
||||
[pgac_cv_check_readline=no
|
||||
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
|
||||
for pgac_rllib in -lreadline -ledit ; do
|
||||
pgac_save_LIBS=$LIBS
|
||||
LIBS="${pgac_rllib}${pgac_lib} $LIBS"
|
||||
pgac_save_LIBS=$LIBS
|
||||
for pgac_rllib in -lreadline -ledit ; do
|
||||
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
|
||||
LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
|
||||
AC_TRY_LINK_FUNC([readline], [[
|
||||
# NetBSD, OpenBSD, and Irix have a broken linker that does not
|
||||
# recognize dependent libraries
|
||||
@ -99,7 +99,6 @@ for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
|
||||
pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
|
||||
break 2
|
||||
]])
|
||||
LIBS=$pgac_save_LIBS
|
||||
done
|
||||
done
|
||||
LIBS=$pgac_save_LIBS
|
||||
|
Reference in New Issue
Block a user