mirror of https://github.com/proxmox/mirror_qemu
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.
Fixes: 5285e593c3
(configure: Fixes ncursesw detection under msys2/mingw by convert them to meson)
Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Yonggang Luo<l <brogers@suse.com>uoyonggang@gmail.com>
Reviewed-by:Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20201014221939.196958-1-brogers@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
master
parent
5c53015a48
commit
ac0c8351ab
16
meson.build
16
meson.build
|
@ -459,15 +459,13 @@ if not get_option('iconv').disabled()
|
||||||
libiconv = cc.find_library('iconv',
|
libiconv = cc.find_library('iconv',
|
||||||
required: false,
|
required: false,
|
||||||
static: enable_static)
|
static: enable_static)
|
||||||
if libiconv.found()
|
if cc.links('''
|
||||||
if cc.links('''
|
#include <iconv.h>
|
||||||
#include <iconv.h>
|
int main(void) {
|
||||||
int main(void) {
|
iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
|
||||||
iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
|
return conv != (iconv_t) -1;
|
||||||
return conv != (iconv_t) -1;
|
}''', dependencies: [libiconv])
|
||||||
}''', dependencies: [libiconv])
|
iconv = declare_dependency(dependencies: [libiconv])
|
||||||
iconv = declare_dependency(dependencies: [libiconv])
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if get_option('iconv').enabled() and not iconv.found()
|
if get_option('iconv').enabled() and not iconv.found()
|
||||||
|
|
Loading…
Reference in New Issue