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

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.