forked from osmocom/wireshark
Fix CMake checks of PCap functions, along with AirPCap
Change-Id: If55498167d5e357258841f2194962749c0dfc81e Reviewed-on: https://code.wireshark.org/review/3787 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
This commit is contained in:
parent
87b2364a84
commit
5b5ef967d2
|
@ -34,9 +34,11 @@ find_package_handle_standard_args( AIRPCAP DEFAULT_MSG AIRPCAP_INCLUDE_DIR AIRPC
|
|||
if( AIRPCAP_FOUND )
|
||||
set( AIRPCAP_INCLUDE_DIRS ${AIRPCAP_INCLUDE_DIR} )
|
||||
set( AIRPCAP_LIBRARIES ${AIRPCAP_LIBRARY} )
|
||||
set( HAVE_AIRPCAP 1)
|
||||
else()
|
||||
set( AIRPCAP_INCLUDE_DIRS )
|
||||
set( AIRPCAP_LIBRARIES )
|
||||
set( HAVE_AIRPCAP 0)
|
||||
endif()
|
||||
|
||||
mark_as_advanced( AIRPCAP_LIBRARIES AIRPCAP_INCLUDE_DIRS )
|
||||
|
|
|
@ -76,11 +76,12 @@ check_function_exists( "pcap_lib_version" HAVE_PCAP_LIB_VERSION )
|
|||
check_function_exists( "pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS )
|
||||
check_function_exists( "pcap_set_datalink" HAVE_PCAP_SET_DATALINK )
|
||||
check_function_exists( "bpf_image" HAVE_BPF_IMAGE )
|
||||
check_function_exists( "pcap_setsampling" HAVE_PCAP_SETSAMPLING )
|
||||
# Remote pcap checks
|
||||
check_function_exists( "pcap_open" H_PCAP_OPEN )
|
||||
check_function_exists( "pcap_open" HAVE_PCAP_OPEN )
|
||||
check_function_exists( "pcap_findalldevs_ex" H_FINDALLDEVS_EX )
|
||||
check_function_exists( "pcap_createsrcstr" H_CREATESRCSTR )
|
||||
if( H_PCAP_OPEN AND H_FINDALLDEVS_EX AND H_CREATESRCSTR )
|
||||
if( HAVE_PCAP_OPEN AND H_FINDALLDEVS_EX AND H_CREATESRCSTR )
|
||||
set( HAVE_PCAP_REMOTE 1 )
|
||||
set( HAVE_REMOTE 1 )
|
||||
endif()
|
||||
|
|
|
@ -217,6 +217,9 @@
|
|||
/* Define to 1 if you have the `pcap_list_datalinks' function. */
|
||||
#cmakedefine HAVE_PCAP_LIST_DATALINKS 1
|
||||
|
||||
/* Define to 1 if you have the `pcap_open' function. */
|
||||
#cmakedefine HAVE_PCAP_OPEN 1
|
||||
|
||||
/* Define to 1 if you have the `pcap_open_dead' function. */
|
||||
#cmakedefine HAVE_PCAP_OPEN_DEAD 1
|
||||
|
||||
|
@ -227,6 +230,9 @@
|
|||
/* Define to 1 if you have the `pcap_set_datalink' function. */
|
||||
#cmakedefine HAVE_PCAP_SET_DATALINK 1
|
||||
|
||||
/* Define to 1 if you have the `pcap_setsampling" function. */
|
||||
#cmakedefine HAVE_PCAP_SETSAMPLING 1
|
||||
|
||||
/* Define to 1 if you have the <portaudio.h> header file. */
|
||||
#cmakedefine HAVE_PORTAUDIO_H 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue