Alexander Afanasyev | c78b141 | 2014-02-19 14:08:26 -0800 | [diff] [blame^] | 1 | #!/usr/bin/env python |
| 2 | # encoding: utf-8 |
| 3 | |
| 4 | BOOST_ASIO_HAS_LOCAL_SOCKETS_CHECK = ''' |
| 5 | #include <iostream> |
| 6 | #include <boost/asio.hpp> |
| 7 | int 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 | |
| 17 | def 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 |