intl dep: support static kwarg
Since intl links internally to iconv, try to pull in iconv too, but only
if we specifically ask for static libs.
If PREFER_SHARED, we have no way to tell which type we got, so do not
try handling that...
@@ -455,11 +455,14 @@ class IntlSystemDependency(SystemDependency):
super().__init__(name, env, kwargs)
h = self.clib_compiler.has_header('libintl.h', '', env)
- self.link_args = self.clib_compiler.find_library('intl', env, [])
+ self.link_args = self.clib_compiler.find_library('intl', env, [], self.libtype)
if h[0] and self.link_args:
self.is_found = True
+ if self.static:
+ self.link_args += self.clib_compiler.find_library('iconv', env, [], self.libtype)
+
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL, DependencyMethods.SYSTEM})
def curses_factory(env: 'Environment',
