From: Colin Vidal Date: Mon, 21 Jul 2025 12:38:30 +0000 (+0200) Subject: Export plugin extension in config.h X-Git-Tag: v9.21.11~23^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be03ed6520227426d2c38616b4408cc340dca4da;p=thirdparty%2Fbind9.git Export plugin extension in config.h Dynamically loadable libraries all use the `.so` extension on BIND9-supported platforms, except for macOS. Export the dynamic library extension of the current build platform in the generated `config.h` file, in order to let the plugin code building plugin path based on a simple plugin name. (which then would be platform-independent) --- diff --git a/meson.build b/meson.build index 7697be86d43..c4316aa05dd 100644 --- a/meson.build +++ b/meson.build @@ -215,7 +215,8 @@ if host_machine.cpu_family() == 'x86' ) endif -if host_machine.system() == 'darwin' +isdarwin = host_machine.system() == 'darwin' +if isdarwin add_project_arguments( cc.get_supported_arguments( '-Wno-deprecated-declarations', # For GSS.Framework @@ -279,6 +280,13 @@ config.set_quoted('RNDC_CONFFILE', sysconfdir / 'rndc.conf') config.set_quoted('RNDC_KEYFILE', sysconfdir / 'rndc.key') config.set_quoted('NAMED_PLUGINDIR', libdir / 'bind') +if isdarwin + # Plugin extensions - macOS is the only specific case + config.set_quoted('NAMED_PLUGINEXT', '.dylib') +else + config.set_quoted('NAMED_PLUGINEXT', '.so') +endif + config.set_quoted('NAMED_LOCALSTATEDIR', localstatedir) config.set_quoted('NAMED_SYSCONFDIR', sysconfdir) config.set_quoted('NAMED_CONFFILE', sysconfdir / 'named.conf')