All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson.build: don't condition iconv detection on library detection
@ 2020-10-14 22:19 Bruce Rogers
  2020-10-15  4:33 ` 罗勇刚(Yonggang Luo)
  2020-10-15 17:12 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Bruce Rogers @ 2020-10-14 22:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: luoyonggang, kraxel, Bruce Rogers

It isn't necessarily the case that use of iconv requires an additional
library. For that reason we shouldn't conditionalize iconv detection on
libiconv.found.

Fixes: 5285e593c33 (configure: Fixes ncursesw detection under msys2/mingw by convert them to meson)

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 meson.build | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/meson.build b/meson.build
index 1a4a482492..84c8ec9541 100644
--- a/meson.build
+++ b/meson.build
@@ -431,15 +431,13 @@ if not get_option('iconv').disabled()
   libiconv = cc.find_library('iconv',
                              required: false,
                              static: enable_static)
-  if libiconv.found()
-    if cc.links('''
-      #include <iconv.h>
-      int main(void) {
-        iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
-        return conv != (iconv_t) -1;
-      }''', dependencies: [libiconv])
-      iconv = declare_dependency(dependencies: [libiconv])
-    endif
+  if cc.links('''
+    #include <iconv.h>
+    int main(void) {
+      iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
+      return conv != (iconv_t) -1;
+    }''', dependencies: [libiconv])
+    iconv = declare_dependency(dependencies: [libiconv])
   endif
 endif
 if get_option('iconv').enabled() and not iconv.found()
-- 
2.28.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] meson.build: don't condition iconv detection on library detection
  2020-10-14 22:19 [PATCH] meson.build: don't condition iconv detection on library detection Bruce Rogers
@ 2020-10-15  4:33 ` 罗勇刚(Yonggang Luo)
  2020-10-15  6:51   ` Philippe Mathieu-Daudé
  2020-10-15 17:12 ` Paolo Bonzini
  1 sibling, 1 reply; 4+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-10-15  4:33 UTC (permalink / raw)
  To: Bruce Rogers; +Cc: qemu-level, Gerd Hoffmann

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

On Thu, Oct 15, 2020 at 6:19 AM Bruce Rogers <brogers@suse.com> wrote:
>
> It isn't necessarily the case that use of iconv requires an additional
> library. For that reason we shouldn't conditionalize iconv detection on
> libiconv.found.
>
> Fixes: 5285e593c33 (configure: Fixes ncursesw detection under msys2/mingw
by convert them to meson)
>
> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>  meson.build | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 1a4a482492..84c8ec9541 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -431,15 +431,13 @@ if not get_option('iconv').disabled()
>    libiconv = cc.find_library('iconv',
>                               required: false,
>                               static: enable_static)
> -  if libiconv.found()
> -    if cc.links('''
> -      #include <iconv.h>
> -      int main(void) {
> -        iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
> -        return conv != (iconv_t) -1;
> -      }''', dependencies: [libiconv])
> -      iconv = declare_dependency(dependencies: [libiconv])
> -    endif
> +  if cc.links('''
> +    #include <iconv.h>
> +    int main(void) {
> +      iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
> +      return conv != (iconv_t) -1;
> +    }''', dependencies: [libiconv])
> +    iconv = declare_dependency(dependencies: [libiconv])
>    endif
>  endif
>  if get_option('iconv').enabled() and not iconv.found()
> --
> 2.28.0
>
Reviewed-by: Yonggang Luo<l <brogers@suse.com>uoyonggang@gmail.com>

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] meson.build: don't condition iconv detection on library detection
  2020-10-15  4:33 ` 罗勇刚(Yonggang Luo)
@ 2020-10-15  6:51   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-15  6:51 UTC (permalink / raw)
  To: luoyonggang, Bruce Rogers; +Cc: qemu-level, Gerd Hoffmann

On 10/15/20 6:33 AM, 罗勇刚(Yonggang Luo) wrote:
> 
> 
> On Thu, Oct 15, 2020 at 6:19 AM Bruce Rogers <brogers@suse.com 
> <mailto:brogers@suse.com>> wrote:
>  >
>  > It isn't necessarily the case that use of iconv requires an additional
>  > library. For that reason we shouldn't conditionalize iconv detection on
>  > libiconv.found.
>  >
>  > Fixes: 5285e593c33 (configure: Fixes ncursesw detection under 
> msys2/mingw by convert them to meson)
>  >
>  > Signed-off-by: Bruce Rogers <brogers@suse.com <mailto:brogers@suse.com>>
>  > ---
>  >  meson.build | 16 +++++++---------
>  >  1 file changed, 7 insertions(+), 9 deletions(-)
>  >
>  > diff --git a/meson.build b/meson.build
>  > index 1a4a482492..84c8ec9541 100644
>  > --- a/meson.build
>  > +++ b/meson.build
>  > @@ -431,15 +431,13 @@ if not get_option('iconv').disabled()
>  >    libiconv = cc.find_library('iconv',
>  >                               required: false,
>  >                               static: enable_static)
>  > -  if libiconv.found()
>  > -    if cc.links('''
>  > -      #include <iconv.h>
>  > -      int main(void) {
>  > -        iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
>  > -        return conv != (iconv_t) -1;
>  > -      }''', dependencies: [libiconv])
>  > -      iconv = declare_dependency(dependencies: [libiconv])
>  > -    endif
>  > +  if cc.links('''
>  > +    #include <iconv.h>
>  > +    int main(void) {
>  > +      iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
>  > +      return conv != (iconv_t) -1;
>  > +    }''', dependencies: [libiconv])
>  > +    iconv = declare_dependency(dependencies: [libiconv])
>  >    endif
>  >  endif
>  >  if get_option('iconv').enabled() and not iconv.found()
>  > --
>  > 2.28.0
>  >
> Reviewed-by: Yonggang Luo<l 
> <mailto:brogers@suse.com>uoyonggang@gmail.com <mailto:uoyonggang@gmail.com>>

Something is certainly wrong here =)
I suppose you meant:

Reviewed-by:Yonggang Luo <luoyonggang@gmail.com>

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] meson.build: don't condition iconv detection on library detection
  2020-10-14 22:19 [PATCH] meson.build: don't condition iconv detection on library detection Bruce Rogers
  2020-10-15  4:33 ` 罗勇刚(Yonggang Luo)
@ 2020-10-15 17:12 ` Paolo Bonzini
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-10-15 17:12 UTC (permalink / raw)
  To: Bruce Rogers, qemu-devel; +Cc: luoyonggang, kraxel

On 15/10/20 00:19, Bruce Rogers wrote:
> It isn't necessarily the case that use of iconv requires an additional
> library. For that reason we shouldn't conditionalize iconv detection on
> libiconv.found.
> 
> Fixes: 5285e593c33 (configure: Fixes ncursesw detection under msys2/mingw by convert them to meson)
> 
> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>  meson.build | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 1a4a482492..84c8ec9541 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -431,15 +431,13 @@ if not get_option('iconv').disabled()
>    libiconv = cc.find_library('iconv',
>                               required: false,
>                               static: enable_static)
> -  if libiconv.found()
> -    if cc.links('''
> -      #include <iconv.h>
> -      int main(void) {
> -        iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
> -        return conv != (iconv_t) -1;
> -      }''', dependencies: [libiconv])
> -      iconv = declare_dependency(dependencies: [libiconv])
> -    endif
> +  if cc.links('''
> +    #include <iconv.h>
> +    int main(void) {
> +      iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
> +      return conv != (iconv_t) -1;
> +    }''', dependencies: [libiconv])
> +    iconv = declare_dependency(dependencies: [libiconv])
>    endif
>  endif
>  if get_option('iconv').enabled() and not iconv.found()
> 

Queued, thanks.

Paolo



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-15 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 22:19 [PATCH] meson.build: don't condition iconv detection on library detection Bruce Rogers
2020-10-15  4:33 ` 罗勇刚(Yonggang Luo)
2020-10-15  6:51   ` Philippe Mathieu-Daudé
2020-10-15 17:12 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.