diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-12-02 20:04:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-12-02 20:04:20 +0000 |
commit | c833c6c558eee7d51c3aa9540327aadb376057d4 (patch) | |
tree | 980d773b88bb82046a8c428295624ef0373de2ac /config | |
parent | d76589114d1723bb0cb666dcb70058b74052e63b (diff) | |
download | postgresql-c833c6c558eee7d51c3aa9540327aadb376057d4.tar.gz |
Hack to work around broken linker on older NetBSD/OpenBSD/Irix assumed
that readline must depend on libcurses, but it seems more recent ones
use libtermcap instead. Allow that case.
Diffstat (limited to 'config')
-rw-r--r-- | config/programs.m4 | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/config/programs.m4 b/config/programs.m4 index 00dd44b7ff..3f87396533 100644 --- a/config/programs.m4 +++ b/config/programs.m4 @@ -1,4 +1,4 @@ -# $PostgreSQL: pgsql/config/programs.m4,v 1.17 2004/11/30 06:13:02 tgl Exp $ +# $PostgreSQL: pgsql/config/programs.m4,v 1.18 2004/12/02 20:04:19 tgl Exp $ # PGAC_PATH_FLEX @@ -87,13 +87,14 @@ 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 - case $host_os in netbsd* | openbsd* | irix*) - case $pgac_lib in - *curses*) ;; - *) pgac_lib=" -lcurses" ;; - esac + # Older NetBSD, OpenBSD, and Irix have a broken linker that does not + # recognize dependent libraries; assume curses is needed if we didn't + # find any dependency. + case $host_os in + netbsd* | openbsd* | irix*) + if test x"$pgac_lib" = x"" ; then + pgac_lib=" -lcurses" + fi ;; esac pgac_cv_check_readline="${pgac_rllib}${pgac_lib}" |