From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvG6o-0003tw-7H for qemu-devel@nongnu.org; Tue, 15 Jan 2013 18:40:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvG6m-0004Kb-Lv for qemu-devel@nongnu.org; Tue, 15 Jan 2013 18:39:58 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:55629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvG6m-0004Jr-Hj for qemu-devel@nongnu.org; Tue, 15 Jan 2013 18:39:56 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Jan 2013 18:39:55 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 720E538C8039 for ; Tue, 15 Jan 2013 18:39:53 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0FNdqWO20250726 for ; Tue, 15 Jan 2013 18:39:53 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0FNdq1p018864 for ; Tue, 15 Jan 2013 18:39:52 -0500 From: Anthony Liguori In-Reply-To: <50F5E785.6060304@gmail.com> References: <1358270033-18064-1-git-send-email-stefanha@redhat.com> <1358270033-18064-4-git-send-email-stefanha@redhat.com> <87obgqnjg1.fsf@codemonkey.ws> <50F5E785.6060304@gmail.com> Date: Tue, 15 Jan 2013 17:39:50 -0600 Message-ID: <87y5fuhv7d.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 3/3 v2] configure: try pkg-config for curses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vadim Evard Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Vadim Evard writes: > 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 The original patch is already in master so you'll need to send an incremental one. Regards, Anthony Liguori > --- > configure | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index c908f66..477c4e0 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 2>/dev/null)" > 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 > -- > 1.7.10.4 > > > > On 16.01.2013 02:57, Anthony Liguori wrote: >> Stefan Hajnoczi writes: >> >>> From: Vadim Evard >>> >>> 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 >>> --- >>> configure | 5 ++++- >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure b/configure >>> index c908f66..40473a9 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)" >> >> Please fix this as a follow up but this is sloppy. >> >> pkg-config spews stuff to stderr when a package isn't found so this ends >> up outputting junk in the configure if ncurses isn't found. >> >> Regards, >> >> Anthony Liguori >> >>> 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 >>> -- >>> 1.8.0.2 >>