diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-30 06:13:04 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-30 06:13:04 +0000 |
| commit | aef2d0d86c9a39f33672d3d04869b641815430c4 (patch) | |
| tree | 671d9288573e7edfa160c930a1dc0ca045fd4920 /config | |
| parent | c3df447a03654d5374f5c6998e3250f1981aedb8 (diff) | |
| download | postgresql-aef2d0d86c9a39f33672d3d04869b641815430c4.tar.gz | |
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.
Diffstat (limited to 'config')
| -rw-r--r-- | config/programs.m4 | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/config/programs.m4 b/config/programs.m4 index aca56bb3c9..00dd44b7ff 100644 --- a/config/programs.m4 +++ b/config/programs.m4 @@ -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 |
