diff --git a/meson.build b/meson.build index 4c273edf55..7da784cc8e 100644 --- a/meson.build +++ b/meson.build @@ -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') @@ -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()), diff --git a/meson_options.txt b/meson_options.txt index 878cd39905..ca96ea8ecc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/src/meson.build b/src/meson.build index 6bde61839a..4ffb7aa864 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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)