summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-26 18:21:05 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-27 02:21:35 +0000
commit0a0ce2b78f4c537e7c667080cc00181884c97057 (patch)
tree14f9d1a59527c2eb904264357b5c38d6c96c63fd
parenteff91ed57fb21ed9a3f75ddb8377d7dcd3516d91 (diff)
downloadwireshark-0a0ce2b78f4c537e7c667080cc00181884c97057.tar.gz
Check for optreset in CMake as well.
Change-Id: I74aae1d68f48702b0cd1289cdafdfff8d817b5f4 Reviewed-on: https://code.wireshark.org/review/6068 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ConfigureChecks.cmake7
-rw-r--r--cmakeconfig.h.in3
2 files changed, 10 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bc530a93b7..46ab28f59a 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -78,6 +78,13 @@ cmake_pop_check_state()
check_symbol_exists("floorl" "math.h" HAVE_FLOORL)
check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2)
check_function_exists("getopt_long" HAVE_GETOPT_LONG)
+if(HAVE_GETOPT_LONG)
+ if(HAVE_GETOPT_H)
+ check_symbol_exists("optreset" "getopt.h" HAVE_OPTRESET)
+ else()
+ check_symbol_exists("optreset" HAVE_OPTRESET)
+ endif()
+endif()
check_function_exists("getprotobynumber" HAVE_GETPROTOBYNUMBER)
check_function_exists("inet_aton" HAVE_INET_ATON)
check_function_exists("inet_ntop" HAVE_INET_NTOP_PROTO)
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index d5b29529cc..78e98a1b0a 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -254,6 +254,9 @@
/* Define if python devel package available */
#cmakedefine HAVE_PYTHON 1
+/* Define to 1 if you have the optreset variable */
+#cmakedefine HAVE_OPTRESET 1
+
/* Define to 1 to enable remote capturing feature in WinPcap library */
#cmakedefine HAVE_REMOTE 1