Skip to content

Commit

Permalink
build-sys: meson: add tcp-wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
i-garrison authored and PulseAudio Marge Bot committed Feb 12, 2021
1 parent f7f9c70 commit 156e16f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion meson.build
Expand Up @@ -655,6 +655,11 @@ if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif

tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
cdata.set('HAVE_LIBWRAP', 1)
endif

x11_dep = dependency('x11-xcb', required : get_option('x11'))
if x11_dep.found()
xcb_dep = dependency('xcb', required : true, version : '>= 1.6')
Expand Down Expand Up @@ -894,7 +899,7 @@ summary = [
'Enable udev: @0@'.format(udev_dep.found()),
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
'Enable systemd: @0@'.format(libsystemd_dep.found()),
# 'Enable TCP Wrappers: @0@'.format(${ENABLE_TCPWRAP}),
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
'Enable IPv6: @0@'.format(get_option('ipv6')),
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
Expand Down
3 changes: 3 additions & 0 deletions meson_options.txt
Expand Up @@ -141,6 +141,9 @@ option('speex',
option('systemd',
type : 'feature', value : 'auto',
description : 'Optional systemd support')
option('tcpwrap',
type : 'feature', value : 'auto',
description : 'Optional TCP wrappers support')
option('udev',
type : 'feature', value : 'auto',
description : 'Optional udev support')
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Expand Up @@ -201,7 +201,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, libintl_dep,
platform_dep, platform_socket_dep, execinfo_dep,
platform_dep, tcpwrap_dep, platform_socket_dep, execinfo_dep,
],
implicit_include_directories : false)

Expand Down

0 comments on commit 156e16f

Please sign in to comment.