From f6598a69e721e0257721ca39246a23ad9bd63e98 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 20:30:33 +0000 Subject: [PATCH] Add getopt detection. --- include/ac/unistd.h | 15 ++++++++++++++- include/portable.h.in | 6 ++++++ include/portable.h.nt | 10 ++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/include/ac/unistd.h b/include/ac/unistd.h index f524f99b2f..5e4501f589 100644 --- a/include/ac/unistd.h +++ b/include/ac/unistd.h @@ -3,11 +3,24 @@ #ifndef _AC_UNISTD_H #define _AC_UNISTD_H -#if HAVE_UNISTD_H +#if HAVE_SYS_TYPES_H # include +#endif + +#if HAVE_UNISTD_H # include #endif +/* getopt() defines may be in separate include file */ +#if HAVE_GETOPT_H +# include +#endif + +#ifndef HAVE_GETOPT +/* no getopt, assume we need getopt-compat.h */ +# include +#endif + /* use _POSIX_VERSION for POSIX.1 code */ #endif /* _AC_UNISTD_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 6c782517ea..6b0abe55f8 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -230,6 +230,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME +/* Define if you have the getopt function. */ +#undef HAVE_GETOPT + /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY @@ -323,6 +326,9 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the header file. */ #undef HAVE_GDBM_H +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + /* Define if you have the header file. */ #undef HAVE_KERBEROSIV_DES_H diff --git a/include/portable.h.nt b/include/portable.h.nt index cbbbfde51b..fff5c3f210 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -245,6 +245,9 @@ typedef char * caddr_t; /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 +/* define if you have the getopt function */ +#undef HAVE_GETOPT + /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY @@ -285,7 +288,7 @@ typedef char * caddr_t; #undef HAVE_SIGSET /* Define if you have the socket function. */ -#undef HAVE_SOCKET +#define HAVE_SOCKET 1 /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 @@ -338,6 +341,9 @@ typedef char * caddr_t; /* Define if you have the header file. */ #undef HAVE_GDBM_H +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + /* Define if you have the header file. */ #undef HAVE_KERBEROSIV_DES_H @@ -405,7 +411,7 @@ typedef char * caddr_t; #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 +#undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H -- 2.39.5