aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-03-17 19:31:33 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-03-17 19:31:33 +0000
commit444d8bc302c04734207eddd624aa1734eea98604 (patch)
tree24cf82cfb4383eeb2e437a660312913368eec223 /cmake
parent56eaef472b1bd9def75d02d7bf7ce49ecd3970c4 (diff)
Add CMake tests for pcap_datalink_val_to_description() and
pcap_free_datalinks(). Sort the CMake tests in cmake/modules/FindPCAP.cmake into the same order as the tests in the autoconf script, and note that, in the autoconf script, the checks for pcap_open_dead() and pcap_freecode() do more than just look for the routines in the library. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32225 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindPCAP.cmake20
1 files changed, 14 insertions, 6 deletions
diff --git a/cmake/modules/FindPCAP.cmake b/cmake/modules/FindPCAP.cmake
index 0d54c644b0..4a59f05511 100644
--- a/cmake/modules/FindPCAP.cmake
+++ b/cmake/modules/FindPCAP.cmake
@@ -100,16 +100,24 @@ ENDIF(PCAP_LIBRARIES)
INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS})
SET(CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES})
+CHECK_FUNCTION_EXISTS("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
+CHECK_FUNCTION_EXISTS("pcap_freecode" HAVE_PCAP_FREECODE)
+#
+# Note: for pcap_breakloop() and pcap_findalldevs(), the autoconf script
+# checks for more than just whether the function exists, it also checks
+# for whether pcap.h declares it; Mac OS X software/security updates can
+# update libpcap without updating the headers.
+#
CHECK_FUNCTION_EXISTS("pcap_breakloop" HAVE_PCAP_BREAKLOOP)
-CHECK_FUNCTION_EXISTS("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
-CHECK_FUNCTION_EXISTS("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
CHECK_FUNCTION_EXISTS("pcap_findalldevs" HAVE_PCAP_FINDALLDEVS)
-CHECK_FUNCTION_EXISTS("pcap_freecode" HAVE_PCAP_FREECODE)
-CHECK_FUNCTION_EXISTS("pcap_get_selectable_fd" HAVE_PCAP_GET_SELECTABLE_FD)
-CHECK_FUNCTION_EXISTS("pcap_lib_version" HAVE_PCAP_LIB_VERSION)
+CHECK_FUNCTION_EXISTS("pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME)
+CHECK_FUNCTION_EXISTS("pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL)
+CHECK_FUNCTION_EXISTS("pcap_datalink_val_to_description" HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION)
CHECK_FUNCTION_EXISTS("pcap_list_datalinks" HAVE_PCAP_LIST_DATALINKS)
-CHECK_FUNCTION_EXISTS("pcap_open_dead" HAVE_PCAP_OPEN_DEAD)
CHECK_FUNCTION_EXISTS("pcap_set_datalink" HAVE_PCAP_SET_DATALINK)
+CHECK_FUNCTION_EXISTS("pcap_lib_version" HAVE_PCAP_LIB_VERSION)
+CHECK_FUNCTION_EXISTS("pcap_get_selectable_fd" HAVE_PCAP_GET_SELECTABLE_FD)
+CHECK_FUNCTION_EXISTS("pcap_free_datalinks" HAVE_PCAP_FREE_DATALINKS)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCAP DEFAULT_MSG PCAP_INCLUDE_DIRS PCAP_LIBRARIES)