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> |
Davide Pesavento | 4147c00 | 2014-11-18 17:04:42 +0100 | [diff] [blame] | 11 | #if defined(BOOST_ASIO_HAS_KQUEUE) and BOOST_VERSION == 105600 |
| 12 | #error "Ethernet face support cannot be enabled on this platform with boost 1.56" |
Alexander Afanasyev | e918621 | 2014-08-23 20:15:48 -0700 | [diff] [blame] | 13 | #endif |
| 14 | ''' |
| 15 | |
| 16 | @Configure.conf |
| 17 | def check_asio_pcap_support(conf): |
Davide Pesavento | 4147c00 | 2014-11-18 17:04:42 +0100 | [diff] [blame] | 18 | # https://svn.boost.org/trac/boost/ticket/10367 |
Alexander Afanasyev | e918621 | 2014-08-23 20:15:48 -0700 | [diff] [blame] | 19 | if conf.check_cxx(msg='Checking if Ethernet face support can be enabled', |
| 20 | fragment=BOOST_ASIO_HAS_KQUEUE_CHECK, |
| 21 | features='cxx', use='BOOST', mandatory=False): |
| 22 | conf.define('HAVE_ASIO_PCAP_SUPPORT', 1) |
| 23 | conf.env['HAVE_ASIO_PCAP_SUPPORT'] = True |