summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-07-16 21:12:12 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-07-16 21:12:12 +0000
commitcc82d38c8b7c03d729f177274dbe33d67c867e0b (patch)
tree3203dc900c110f50b596621dbad1e96d4e3989af
parent421e9ad4a04a55c7afa8e9ef45a52135526f7e61 (diff)
downloadwireshark-cc82d38c8b7c03d729f177274dbe33d67c867e0b.tar.gz
set HAVE_GETOPT_H and HAVE_GETOPT variables
for both autotools and cmake builds (in order to use getopt_long(), we have to check if we can include getopt.h) svn path=/trunk/; revision=50680
-rw-r--r--ConfigureChecks.cmake1
-rw-r--r--cmakeconfig.h.in5
-rw-r--r--configure.ac2
3 files changed, 6 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 2baed4edc9..f36ada153b 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -31,6 +31,7 @@ check_include_file("direct.h" HAVE_DIRECT_H)
check_include_file("dirent.h" HAVE_DIRENT_H)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
+check_include_file("getopt.h" HAVE_GETOPT_H)
check_include_file("grp.h" HAVE_GRP_H)
check_include_file("g_ascii_strtoull.h" NEED_G_ASCII_STRTOULL_H)
check_include_file("inet/aton.h" NEED_INET_ATON_H)
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index 2b8e9a988a..705e1ef03a 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -48,9 +48,12 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
-/* Define to 1 if you have the <getopt.h> header file. */
+/* Define to 1 if you have the 'getopt' function. */
#cmakedefine HAVE_GETOPT 1
+/* Define to 1 if you have the <getopt.h> header file. */
+#cmakedefine HAVE_GETOPT_H 1
+
/* Define to 1 if you have the `chown' function. */
#cmakedefine HAVE_CHOWN 1
diff --git a/configure.ac b/configure.ac
index b516dec328..30d419934c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2135,7 +2135,7 @@ AC_SUBST(LIBCAP_LIBS)
dnl Checks for header files.
dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/
-AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
+AC_CHECK_HEADERS(direct.h dirent.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)