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
This commit is contained in:
Martin Kaiser 2013-07-16 21:12:12 +00:00
parent 421e9ad4a0
commit cc82d38c8b
3 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)