OSDN Git Service

configure: try pkg-config ncurses first
authorEd Maste <emaste@freebsd.org>
Fri, 24 May 2013 20:07:00 +0000 (16:07 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 1 Jun 2013 10:25:38 +0000 (14:25 +0400)
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>
configure

index e17281e..08ceb43 100755 (executable)
--- a/configure
+++ b/configure
@@ -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