aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-03-17 19:31:33 +0000
committerGuy Harris <guy@alum.mit.edu>2010-03-17 19:31:33 +0000
commite6ecddd41fe66cee1dbffb791a3a1e9a1f951970 (patch)
tree24cf82cfb4383eeb2e437a660312913368eec223 /cmake/modules
parent4827f975cb8fb1ab78fb0c4d0f9882adafa658e1 (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. svn path=/trunk/; revision=32225
Diffstat (limited to 'cmake/modules')
-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)