]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Restore SMF support in the build system
authorMichal Nowak <mnowak@isc.org>
Thu, 23 Jul 2026 09:18:34 +0000 (11:18 +0200)
committerMark Andrews <marka@isc.org>
Mon, 27 Jul 2026 03:50:08 +0000 (13:50 +1000)
libscf detection (AC_CHECK_LIB(scf, smf_enable_instance)) was lost
in the automake rewrite (978c7b2e89aa) and was not added back when
the build system was replaced with meson, so HAVE_LIBSCF was never
defined and the Solaris SMF code in bin/named was dead code.

Detect libscf on SunOS hosts and link named against it.

Assisted-by: Claude:claude-fable-5
meson.build

index a8981dc06ced4c3187eaaacc0e63d6fd919d7db7..de685524a63b539d34b5c78ee0ba42b920a5e463 100644 (file)
@@ -941,6 +941,13 @@ if cap_dep.found()
     config.set('HAVE_LIBCAP', 1)
 endif
 
+## libscf (Solaris SMF)
+scf_dep = null_dep
+if host_machine.system() == 'sunos'
+    scf_dep = cc.find_library('scf', has_headers: 'libscf.h', required: false)
+    config.set('HAVE_LIBSCF', scf_dep.found())
+endif
+
 ## IDN
 idn2_dep = null_dep
 if idn_opt.allowed()
@@ -1758,6 +1765,7 @@ executable(
         lmdb_dep,
         nghttp2_dep,
         ngtcp2_dep,
+        scf_dep,
         xml2_dep,
         zlib_dep,
 
@@ -2175,6 +2183,7 @@ summary(
         'libcap': cap_dep.version(),
         'libedit': edit_dep.version(),
         'libidn2': idn2_dep.version(),
+        'libscf': scf_dep.found(),
         'libxml2': xml2_dep.version(),
         'LMDB': lmdb_dep.version(),
         'MaxMindDB': maxminddb_dep.version(),