libwrap_option = get_option('libwrap')
enable_libwrap = false
if not libwrap_option.disabled() and compiler.has_header('tcpd.h') and compiler.compiles('''
#include <tcpd.h>
bool CheckLibWrap(int fd, const char &progname) {
struct request_info req;
request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);
fromhost(&req);
return hosts_access(&req);
}
''')
libwrap_dep = compiler.find_library('wrap', required: libwrap_option)
else
libwrap_dep = dependency('', required: libwrap_option)
endif
if not libwrap_dep.found() and libwrap_option.enabled()
error('libwrap not found')
endif
conf.set('HAVE_LIBWRAP', libwrap_dep.found())
-
Max Kellermann authored
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
94592c14