qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] meson.build: Don't look for libudev for static builds
Date: Sat, 3 Oct 2020 17:32:30 +0800	[thread overview]
Message-ID: <CAE2XoE9VBgCmj4j-mGY7X7JB5s0AYkweCFySYk3P3UkYkkkMAQ@mail.gmail.com> (raw)
In-Reply-To: <8bd109cd-e78b-6857-d704-4519d8150ef9@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]

On Sat, Oct 3, 2020 at 4:43 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 03/10/20 10:29, 罗勇刚(Yonggang Luo) wrote:
> > For some meson script like this:
> > curses = not_found
> > if iconv.found() and not get_option('curses').disabled()
> >   curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses']
> >   curses_test = '''
> >     #include <locale.h>
> >     #include <curses.h>
> >     #include <wchar.h>
> >     int main(void) {
> >       wchar_t wch = L'w';
> >       setlocale(LC_ALL, "");
> >       resize_term(0, 0);
> >       addwstr(L"wide chars\n");
> >       addnwstr(&wch, 1);
> >       add_wch(WACS_DEGREE);
> >       return 0;
> >     }'''
> >   foreach curses_libname : curses_libname_list
> >       libcurses = dependency(curses_libname,
> >                              required: false,
> >                              method: 'pkg-config',
> >                              static: enable_static)
> >
> >       if not libcurses.found()
> >         dirs = ['/usr/include/ncursesw']
> >         if targetos == 'windows'
> >           dirs = []
> >         endif
> >         libcurses = cc.find_library(curses_libname,
> >                                     required: false,
> >                                     dirs: dirs,
> >                                     static: enable_static)
> >       endif
> >       if libcurses.found()
> >         if cc.links(curses_test, dependencies: [libcurses])
> >           curses = declare_dependency(compile_args:
> > '-DNCURSES_WIDECHAR', dependencies: [libcurses])
> >           break
> >         endif
> >       endif
> >   endforeach
> > endif
> >
> > We also need to define extra  compile_args  '-DNCURSES_WIDECHAR' as the
> > part of dependencies.
>
> You can do that with #define before including <curses.h>.
Yeap, but the  -DNCURSES_WIDECHAR not only used for testing compile of
#include<curses.h> but also
as a dependencies of qemu.
>
> Paolo
>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 2944 bytes --]

  reply	other threads:[~2020-10-03  9:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 10:52 [PATCH] meson.build: Don't look for libudev for static builds Peter Maydell
2020-10-02 11:15 ` 罗勇刚(Yonggang Luo)
2020-10-02 12:03   ` Paolo Bonzini
2020-10-02 12:02 ` Paolo Bonzini
2020-10-02 12:35   ` Peter Maydell
2020-10-02 12:36     ` Peter Maydell
2020-10-02 12:43       ` Paolo Bonzini
2020-10-02 13:01         ` Peter Maydell
2020-10-02 13:05     ` Paolo Bonzini
2020-10-02 13:09       ` Peter Maydell
2020-10-02 14:08         ` Paolo Bonzini
2020-10-02 14:18           ` Peter Maydell
2020-10-02 15:14             ` Paolo Bonzini
2020-10-02 15:28               ` Peter Maydell
2020-10-03  7:24         ` 罗勇刚(Yonggang Luo)
2020-10-03  7:50           ` Paolo Bonzini
2020-10-03  8:28             ` 罗勇刚(Yonggang Luo)
2020-10-03  8:42               ` Paolo Bonzini
2020-10-03  8:29             ` 罗勇刚(Yonggang Luo)
2020-10-03  8:43               ` Paolo Bonzini
2020-10-03  9:32                 ` 罗勇刚(Yonggang Luo) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-12 15:33 [PATCH 00/10] target/arm: Various v8.1M minor features Peter Maydell
2020-10-12 15:33 ` [PATCH] meson.build: Don't look for libudev for static builds Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE2XoE9VBgCmj4j-mGY7X7JB5s0AYkweCFySYk3P3UkYkkkMAQ@mail.gmail.com \
    --to=luoyonggang@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).