TOP_BUILD_DIR = meson.current_build_dir()
TOP_SOURCE_DIR = meson.current_source_dir()
+BINDIR = get_option('bindir')
DATADIR = get_option('datadir')
LIBDIR = get_option('libdir')
LOCALSTATEDIR = get_option('localstatedir')
if krb5_config.found()
# Detect vendor.
vendor_cmd = run_command([krb5_config, '--vendor'], check: false)
- vendor = 'unknown'
- if vendor_cmd.returncode() == 0
- vendor = vendor_cmd.stdout().strip()
+ if vendor_cmd.returncode() != 0
+ path = krb5_config.full_path()
+ message(f'Very old and not usable config script at @path@')
else
- all = run_command([krb5_config, '--all'], check: false)
- if all.returncode() == 0
- foreach i : all.stdout().split('\n')
- if i.startswith('Vendor')
- vendor = i.split(':')[1].strip()
- break
- endif
- endforeach
- endif
+ vendor = vendor_cmd.stdout().strip()
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)
- if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+ 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,
- variables: {
- 'cflags': cflags.stdout().strip(),
- 'libs': libs.stdout().strip(),
- 'vendor': vendor,
- },
+ variables: { 'vendor': vendor, },
)
endif
endif