2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00
kea/subprojects/krb5/meson.build

29 lines
1.1 KiB
Meson
Raw Normal View History

project('krb5')
2025-03-11 10:12:00 +01:00
current_source_dir = meson.current_source_dir()
krb5 = disabler()
krb5_config = find_program('krb5-config', required: false)
2025-03-11 10:12:00 +01:00
if krb5_config.found()
2025-03-18 15:30:24 +02:00
# Detect vendor.
vendor_cmd = run_command([krb5_config, '--vendor'], check: false)
2025-03-18 15:20:06 +01:00
if vendor_cmd.returncode() != 0
path = krb5_config.full_path()
message(f'Very old and not usable config script at @path@')
2025-03-18 15:30:24 +02:00
else
2025-03-18 15:20:06 +01:00
vendor = vendor_cmd.stdout().strip()
2025-03-18 15:30:24 +02:00
endif
cflags = run_command([krb5_config, '--cflags', 'gssapi'], check: false)
libs = run_command([krb5_config, '--libs', 'gssapi'], check: false)
version = run_command([krb5_config, '--version'], check: false)
2025-03-18 15:20:06 +01:00
if vendor_cmd.returncode() == 0 and cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
krb5_version = version.stdout().strip()
krb5 = declare_dependency(
compile_args: cflags.stdout().split(),
link_args: libs.stdout().split(),
version: krb5_version,
2025-03-19 12:36:56 +02:00
variables: {'vendor': vendor},
)
endif
endif