blob: d4d5139df751a248ae9f590bdab4be30b84d3ed3 [file] [log] [blame]
Alexander Afanasyeve9186212014-08-23 20:15:48 -07001# -*- 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
7from waflib import Configure
8
9BOOST_ASIO_HAS_KQUEUE_CHECK = '''
10#include <boost/asio.hpp>
Davide Pesavento4147c002014-11-18 17:04:42 +010011#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 Afanasyeve9186212014-08-23 20:15:48 -070013#endif
14'''
15
16@Configure.conf
17def check_asio_pcap_support(conf):
Davide Pesavento4147c002014-11-18 17:04:42 +010018 # https://svn.boost.org/trac/boost/ticket/10367
Alexander Afanasyeve9186212014-08-23 20:15:48 -070019 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