diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-07-13 11:39:59 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-07-13 11:39:59 +0530 |
commit | 23ea5e4be1b1bd6022fe618fbb950326b81d8d2b (patch) | |
tree | 507afa6d8e67ea5e9206f3aacc447eb7288839e5 | |
parent | d567440f400033f8d91b04e4c60cc6a0e8333b20 (diff) | |
download | glib-nirbheek/gmodule-symbol-uscore.tar.gz |
meson: Explicitly use G_MODULE_IMPL_NONE instead of 0nirbheek/gmodule-symbol-uscore
This is much clearer than using a contextless number.
-rw-r--r-- | gmodule/meson.build | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gmodule/meson.build b/gmodule/meson.build index ee54832b0..b360b1c0f 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -6,7 +6,8 @@ g_module_have_dlerror = false libdl_dep = [ ] g_module_lib_args = [ ] -g_module_impl = '' +g_module_impl = 'G_MODULE_IMPL_NONE' +g_module_supported = false # Check whether we need preceding underscores g_module_need_uscore = cc.symbols_have_underscore_prefix() @@ -36,13 +37,14 @@ if g_module_impl == 'G_MODULE_IMPL_DL' and cc.has_function('dlerror', args : g_m endif # Done, have we got an implementation? -if g_module_impl == '' - g_module_impl = '0' +if g_module_impl == 'G_MODULE_IMPL_NONE' message('WARNING: No suitable GModule implementation found!') +else + g_module_supported = true endif gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl) -gmoduleconf_conf.set10('G_MODULE_SUPPORTED', g_module_impl != '0') +gmoduleconf_conf.set10('G_MODULE_SUPPORTED', g_module_supported) gmoduleconf_conf.set10('G_MODULE_HAVE_DLERROR', g_module_have_dlerror) gmoduleconf_conf.set10('G_MODULE_NEED_USCORE', g_module_need_uscore) gmoduleconf_conf.set10('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global) @@ -76,7 +78,7 @@ libgmodule = library('gmodule-2.0', link_args : [glib_link_flags], ) -supported_var = 'gmodule_supported=@0@'.format(g_module_impl != '0') +supported_var = 'gmodule_supported=@0@'.format(g_module_supported) pkg.generate(libgmodule, libraries : [thread_dep], |