Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth: try to find ldap libs in case pkconfig is missing (happens on debian11) #15086

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions meson/ldap/meson.build
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
dep_ldap = dependency('', required: false)

if get_option('module-ldap') != 'disabled'
dep_ldap_internal = dependency('ldap', required: true)
dep_lber_internal = dependency('lber', required: true)
dep_ldap_internal = dependency('ldap', required: false)
dep_lber_internal = dependency('lber', required: false)
dep_krb5_internal = dependency('krb5', required: true)

if not dep_ldap_internal.found()
lib_ldap_internal = cxx.find_library('ldap', disabler: true, required: true)
dep_ldap_internal = declare_dependency(dependencies: lib_ldap_internal)
endif
if not dep_lber_internal.found()
lib_lber_internal = cxx.find_library('lber', disabler: true, required: true)
dep_lber_internal = declare_dependency(dependencies: lib_lber_internal)
endif

conf.set('HAVE_LIBLDAP', dep_ldap_internal.found(), description: 'Have libldap')

have_ldap_initialize = cxx.has_function('ldap_initialize', dependencies: dep_ldap_internal)
Expand Down
Loading