Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsga committed Mar 2, 2024
1 parent 34c3e59 commit 97c30b9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
52 changes: 33 additions & 19 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cpu = host_machine.cpu_family()
host_os = host_machine.system()
message(host_os)
target_os = target_machine.system()
bsd_oses = [freebsd', 'openbsd', 'dragonfly']
bsd_oses = ['freebsd', 'openbsd', 'dragonfly']

#if cpu in ['ppc64', 's390x', 'sparc64', x86_64]
# if host.os.contains(['bsd', 'dragonfly'])
Expand Down Expand Up @@ -100,10 +100,15 @@ root_includes = include_directories(
'include',
'etc/afpd',
)

if host_os in bsd_oses
root_includes += include_directories('/usr/local/include')
endif

if host_os == 'netbsd'
root_includes += include_directories('/usr/pkg/include')
endif

#############
# Libraries #
#############
Expand All @@ -113,7 +118,11 @@ netatalk_common_link_args = []

if host_os in bsd_oses
libsearch_dirs += '/usr/local/lib'
endif'
endif

if host_os == 'netbsd'
libsearch_dirs += '/usr/pkg/lib'
endif

socket = cc.find_library('socket', required: false)
if socket.found()
Expand Down Expand Up @@ -155,7 +164,7 @@ yacc = find_program('yacc', required: false)
#################

header_dir = []
if host_os == 'openbsd'
if host_os in bsd_oses
header_dir += '/usr/local/include'
endif

Expand Down Expand Up @@ -358,7 +367,7 @@ if get_option('with-bdb') == ''
bdb_includes += include_directories('/usr/local/include' / dir)
endif
endforeach
if bdb_header == ''
if host_os == 'netbsd'
foreach dir : bdb_subdirs
if fs.exists('/usr/pkg/include' / dir / 'db.h')
bdb_header += '/usr/pkg/include' / dir / 'db.h'
Expand Down Expand Up @@ -527,31 +536,36 @@ with_ssl = crypt.found() or crypto.found()
# Check for GSSAPI
#

lib_dir = []

if host_os == 'dragonfly'
lib_dir += '/usr/local/lib'
if get_option('with-gssapi') == ''
gss = cc.find_library('gss', dirs: libsearch_dirs, required: false)
if not gss.found()
gss = cc.find_library('gssapi', dirs: libsearch_dirs, required: false)
endif
if not gss.found()
gss = cc.find_library(
'gssapi_krb5',
dirs: libsearch_dirs,
required: false,
)
endif
else
if get_option('with-gssapi') != ''
gss = cc.find_library('gssapi', dirs: with_gssapi, required: false)
endif
endif

gss = cc.find_library('gss', dirs: lib_dir, required: false)
gssapi = cc.find_library('gssapi', dirs: lib_dir, required: false)
gssapi_krb5 = cc.find_library(
'gssapi_krb5',
dirs: lib_dir,
required: false,
)

if get_option('with-gssapi').disabled()
if not gss.found()
with_gssapi = false
else
with_gssapi = (
(gss.found() or gssapi.found() or gssapi_krb5.found())
gss.found()
and cc.has_function(
'gss_acquire_cred',
dependencies: [gss, gssapi, gssapi_krb5],
dependencies: gss,
)
)
if get_option('with-gssapi').enabled() and not with_gssapi
if get_option('with-gssapi') != '' and not with_gssapi
error('GSSAPI support requested but not found')
endif
endif
Expand Down
4 changes: 2 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ option(
)
option(
'with-gssapi',
type: 'feature',
value: 'auto',
type: 'string',
value: '',
description: 'Path to GSSAPI for Kerberos V UAM',
)
option(
Expand Down

0 comments on commit 97c30b9

Please sign in to comment.