meson.build: don't condition iconv detection on library detection
PATCH 1/1 meson.build: don't condition iconv detection on library detection
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.
--- meson.build | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
meson.build +7 -9
@@ -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()
Signature · 1 line
2.28.0
Quoted 6 lines · 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)
Quoted 34 lines
Signed-off-by Bruce Rogers <[email protected]>--- meson.build | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)meson.build +7
-10@@ -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() --
Quoted 2 lines
2.28.0
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Philippe Mathieu-Daudé
Reviewed-by Yonggang LuoQuoted 39 lines · 罗勇刚(Yonggang Luo)
Quoted 6 lines · On Thu, Oct 15, 2020 at 6:19 AM Bruce Rogers <[email protected]…
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 undermsys2/mingw by convert them to meson)
Quoted 29 lines
Signed-off-by Bruce Rogers <[email protected] <mailto:[email protected]>>---
meson.build | 16 +++++++---------1 file changed, 7 insertions(+), 9 deletions(-)meson.build +6
-9@@ -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])
Quoted 8 lines
Quoted 7 lines
meson.build +1
-0+ iconv = declare_dependency(dependencies: [libiconv])endif
endif
if get_option('iconv').enabled() and noticonv.found()--
2.28.0Reviewed-by Yonggang Luo<l <mailto:[email protected]>[email protected] <mailto:[email protected]>>
Something is certainly wrong here =)
I suppose you meant:
Quoted 8 lines
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Paolo Bonzini
AppliedQuoted 29 lines · 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 <[email protected]>--- meson.build | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)meson.build +0
-9@@ -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
meson.build if not get_option('iconv').disabled() · line 443
Quoted 10 lines
meson.build +7
-0+ 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