configure: try pkg-config ncurses first

When probing for ncurses, try pkg-config first rather than after
explicit -lncurses and -lcurses.  This fixes static linking in the case
that ncurses has additional dependencies, such as -ltinfo (as on FreeBSD).

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Ed Maste 2013-05-24 16:07:00 -04:00 committed by Michael Tokarev
parent d720e9831c
commit cfeda5f4b8
1 changed files with 1 additions and 1 deletions

2
configure vendored
View File

@ -2157,7 +2157,7 @@ if test "$curses" != "no" ; then
if test "$mingw32" = "yes" ; then
curses_list="-lpdcurses"
else
curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lncurses:-lcurses"
fi
curses_found=no
cat > $TMPC << EOF