-
Notifications
You must be signed in to change notification settings - Fork 976
Description
-
This is not a support question, I have read about opensource and will send support questions to the IRC channel, GitHub Discussions or the mailing list.
-
I have read and understood the 'out in the open' support policy
-
Program: dnsdist
-
Issue type: Bug report
Short description
When I have the libedit development files (headers, pkg-config file, etc.) installed, but I configure dnsdist with meson [...] -Dlibedit=disabled, I still see meson searching for libedit and enabling libedit support:
[...]
Run-time dependency libedit found: YES 3.1
[...]
Edit
libedit support : YES
Environment
- Operating system: Ubuntu 24.04.2 LTS (Noble Numbat)
- Software version: The master branch, commit 7b79eac
- Software source: https://github.com/PowerDNS/pdns/tree/7b79eac90703b7102fbf25a7148906e6f6da09df
Steps to reproduce
- Install the
libedit-devpackage. - Run
meson setup build -Dlibedit=disabledfrom thepdns/dnsdistdistdirectory.
Expected behaviour
meson prints:
[...]
Dependency libedit skipped: feature libedit disabled
[...]
Edit
libedit support : NO
[...]
User defined options
libedit : disabled
Actual behaviour
meson prints:
[...]
Run-time dependency libedit found: YES 3.1
[...]
Edit
libedit support : YES
[...]
User defined options
libedit : disabled
Other information
This patch seems to fix it:
diff --git a/pdns/dnsdistdist/meson/libedit/meson.build b/pdns/dnsdistdist/meson/libedit/meson.build
index 55c2e2988..0d50a87f1 100644
--- a/pdns/dnsdistdist/meson/libedit/meson.build
+++ b/pdns/dnsdistdist/meson/libedit/meson.build
@@ -1,8 +1,10 @@
opt_libedit = get_option('libedit')
-dep_libedit = dependency('libedit', required: false)
+dep_libedit = dependency('libedit', required: opt_libedit)
-if not dep_libedit.found()
- dep_libedit = cxx.find_library('edit', required: opt_libedit)
+if opt_libedit.allowed()
+ if not dep_libedit.found()
+ dep_libedit = cxx.find_library('edit', required: opt_libedit)
+ endif
endif
conf.set('HAVE_LIBEDIT', dep_libedit.found(), description: 'libedit support')