blob: 916fb4249a530f98e689091bb1d7f365152fa3fb [file] [log] [blame]
Alexander Afanasyevc78b1412014-02-19 14:08:26 -08001#!/usr/bin/env python
2# encoding: utf-8
3
4BOOST_ASIO_HAS_LOCAL_SOCKETS_CHECK = '''
5#include <iostream>
6#include <boost/asio.hpp>
7int main() {
8#ifdef BOOST_ASIO_HAS_LOCAL_SOCKETS
9 std::cout << "yes";
10#else
11 std::cout << "no";
12#endif
13 return 0;
14}
15'''
16
17def configure(conf):
18 boost_asio_present = conf.check_cxx(msg='Checking if UNIX socket is supported',
19 fragment=BOOST_ASIO_HAS_LOCAL_SOCKETS_CHECK,
20 use='BOOST NDN_CPP RT',
21 execute=True, define_ret=True)
22 if boost_asio_present == "yes":
23 conf.define('HAVE_UNIX_SOCKETS', 1)
24 conf.env['HAVE_UNIX_SOCKETS'] = True