ncurses seems to only create ncursesw.pc when wide is enabled. Which is problematic as readline.pc ends up with Requires: ncurses which does not exist.
Swapped to test for ncursesw first as both libraries exist but only ncursesw.pc exists. Signed-off-by: Rosen Penev <ros...@gmail.com> --- aclocal.m4 | 7 +++++-- configure.ac | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index cc97bd4..91e36bf 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -966,8 +966,8 @@ AC_CACHE_VAL(bash_cv_termcap_lib, [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, - [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, - [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw, + [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw, + [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, bash_cv_termcap_lib=gnutermcap)])])])])])]) if test "X$_bash_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) @@ -983,6 +983,9 @@ TERMCAP_DEP= elif test $bash_cv_termcap_lib = libtinfo; then TERMCAP_LIB=-ltinfo TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libncursesw; then +TERMCAP_LIB=-lncursesw +TERMCAP_DEP= elif test $bash_cv_termcap_lib = libncurses; then TERMCAP_LIB=-lncurses TERMCAP_DEP= diff --git a/configure.ac b/configure.ac index 15501fa..1316053 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,7 @@ case "$TERMCAP_LIB" in -ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;; -lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; -lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; +-lncursesw) TERMCAP_PKG_CONFIG_LIB=ncursesw ;; -ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;; *) TERMCAP_PKG_CONFIG_LIB=termcap ;; esac -- 2.45.2