Alexander Afanasyev | e918621 | 2014-08-23 20:15:48 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | # |
| 3 | # Copyright (c) 2014, Regents of the University of California |
| 4 | # |
| 5 | # GPL 3.0 license, see the COPYING.md file for more information |
| 6 | |
| 7 | from waflib import Configure |
| 8 | |
| 9 | BOOST_ASIO_HAS_KQUEUE_CHECK = ''' |
| 10 | #include <boost/asio.hpp> |
| 11 | #if defined(BOOST_ASIO_HAS_KQUEUE) and BOOST_VERSION >= 105600 |
| 12 | #error "Ethernet face support cannot be enabled on this platform" |
| 13 | #endif |
| 14 | ''' |
| 15 | |
| 16 | @Configure.conf |
| 17 | def check_asio_pcap_support(conf): |
| 18 | if conf.check_cxx(msg='Checking if Ethernet face support can be enabled', |
| 19 | fragment=BOOST_ASIO_HAS_KQUEUE_CHECK, |
| 20 | features='cxx', use='BOOST', mandatory=False): |
| 21 | conf.define('HAVE_ASIO_PCAP_SUPPORT', 1) |
| 22 | conf.env['HAVE_ASIO_PCAP_SUPPORT'] = True |