@@ -250,6 +250,24 @@ libmsi_dep = declare_dependency(
250250 dependencies : libmsi_deps,
251251)
252252
253+ # --- libeconf (static, built from source — needed on Linux for libblkid) ---
254+ platform_link_deps = []
255+ if host_machine .system() == ' linux'
256+ libeconf = static_library (' econf' ,
257+ ' libeconf/lib/econf_error.c' ,
258+ ' libeconf/lib/getfilecontents.c' ,
259+ ' libeconf/lib/get_value_def.c' ,
260+ ' libeconf/lib/helpers.c' ,
261+ ' libeconf/lib/keyfile.c' ,
262+ ' libeconf/lib/libeconf.c' ,
263+ ' libeconf/lib/libeconf_ext.c' ,
264+ ' libeconf/lib/mergefiles.c' ,
265+ ' libeconf/lib/readconfig.c' ,
266+ include_directories : include_directories (' libeconf/include' , ' libeconf/lib' ),
267+ )
268+ platform_link_deps = [libeconf]
269+ endif
270+
253271# --- Platform-specific link args ---
254272if host_machine .system() == ' windows'
255273 platform_link_args = [
@@ -258,7 +276,7 @@ if host_machine.system() == 'windows'
258276 ' -lbcrypt' ,
259277 ]
260278elif host_machine .system() == ' linux'
261- platform_link_args = [' -static' , ' -leconf ' ]
279+ platform_link_args = [' -static' ]
262280else
263281 platform_link_args = []
264282endif
@@ -301,7 +319,7 @@ wixl = executable('wixl',
301319 ],
302320 c_args : [' -include' , meson .project_build_root() / ' config.h' ],
303321 include_directories : [inc_dirs, gcab_inc_dirs],
304- link_with : libcommon,
322+ link_with : [ libcommon] + platform_link_deps ,
305323 dependencies : [libmsi_dep, libgcab_dep, glib, gio, libxml],
306324 link_args : platform_link_args,
307325 install : true ,
0 commit comments