From be03ed6520227426d2c38616b4408cc340dca4da Mon Sep 17 00:00:00 2001 From: Colin Vidal Date: Mon, 21 Jul 2025 14:38:30 +0200 Subject: [PATCH] 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) --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7697be86d4..c4316aa05d 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')