From: Vadim Evard Date: Tue, 15 Jan 2013 12:17:24 +0000 (+0400) Subject: configure: try pkg-config for curses X-Git-Tag: v1.4.0-rc0~179^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ecbe251fa0eb4905c4a82c887e37057243b9fbad;p=qemu.git configure: try pkg-config for curses Static linkikng against ncurses may require explicit -ltinfo. In case -lcurses and -lncurses both didn't work give pkg-config a chance. Fixes #1094786 for me. Signed-off-by: Vadim Evard Signed-off-by: Stefan Hajnoczi --- diff --git a/configure b/configure index c908f6658..40473a9bd 100755 --- a/configure +++ b/configure @@ -2039,7 +2039,7 @@ fi if test "$mingw32" = "yes" ; then curses_list="-lpdcurses" else - curses_list="-lncurses -lcurses" + curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses)" fi if test "$curses" != "no" ; then @@ -2052,13 +2052,16 @@ int main(void) { return s != 0; } EOF + IFS=: for curses_lib in $curses_list; do + unset IFS if compile_prog "" "$curses_lib" ; then curses_found=yes libs_softmmu="$curses_lib $libs_softmmu" break fi done + unset IFS if test "$curses_found" = "yes" ; then curses=yes else