From cc82d38c8b7c03d729f177274dbe33d67c867e0b Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Tue, 16 Jul 2013 21:12:12 +0000 Subject: 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 --- ConfigureChecks.cmake | 1 + cmakeconfig.h.in | 5 ++++- configure.ac | 2 +- 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 header file. */ #cmakedefine HAVE_FCNTL_H 1 -/* Define to 1 if you have the header file. */ +/* Define to 1 if you have the 'getopt' function. */ #cmakedefine HAVE_GETOPT 1 +/* Define to 1 if you have the 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) -- cgit v1.2.1