From 0a0ce2b78f4c537e7c667080cc00181884c97057 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 26 Dec 2014 18:21:05 -0800 Subject: Check for optreset in CMake as well. Change-Id: I74aae1d68f48702b0cd1289cdafdfff8d817b5f4 Reviewed-on: https://code.wireshark.org/review/6068 Reviewed-by: Guy Harris --- ConfigureChecks.cmake | 7 +++++++ cmakeconfig.h.in | 3 +++ 2 files changed, 10 insertions(+) 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 -- cgit v1.2.1