]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix CDB being automatically picked up when disabled
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 21 Mar 2025 13:58:58 +0000 (14:58 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 25 Mar 2025 09:08:15 +0000 (10:08 +0100)
pdns/dnsdistdist/meson/cdb/meson.build

index 461677317558537e47b533f658f46cc7c2ff22a7..b19da1b19224ecbf477c0044626ffd8adde558d0 100644 (file)
@@ -1,9 +1,12 @@
-dep_cdb = dependency('libcdb', required: false)
+opt_cdb = get_option('cdb')
+dep_cdb = dependency('libcdb', required: opt_cdb)
 
-if not dep_cdb.found()
-  if cxx.has_header('cdb.h', required: false)
-    if cxx.has_function('cdb_find', args: ['-lcdb'])
-      dep_cdb = declare_dependency(link_args: ['-lcdb'])
+if opt_cdb.allowed()
+  if not dep_cdb.found()
+    if cxx.has_header('cdb.h', required: false)
+      if cxx.has_function('cdb_find', args: ['-lcdb'])
+        dep_cdb = declare_dependency(link_args: ['-lcdb'])
+      endif
     endif
   endif
 endif