Check for optreset in CMake as well.
authorGuy Harris <guy@alum.mit.edu>
Sat, 27 Dec 2014 02:21:05 +0000 (18:21 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sat, 27 Dec 2014 02:21:35 +0000 (02:21 +0000)
Change-Id: I74aae1d68f48702b0cd1289cdafdfff8d817b5f4
Reviewed-on: https://code.wireshark.org/review/6068
Reviewed-by: Guy Harris <guy@alum.mit.edu>
ConfigureChecks.cmake
cmakeconfig.h.in

index bc530a93b707b370e6f7eca767d01c1c201f743c..46ab28f59a5d95d4f3ca71008f1b5ecc08d3cf3a 100644 (file)
@@ -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)
index d5b29529ccf68a23a5ff79c032af452741f84c67..78e98a1b0a349c5b285a5d503c7ad584fd665c5e 100644 (file)
 /* 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