From 47ad9afcf38d91059dd23dc2e6f6c2d9d4c3ad80 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:32:17 +0200 Subject: [PATCH] configure.in: Update checks for required and optional features Update checks for required and optional header files, data types, and functions. --- configure.in | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/configure.in b/configure.in index 0f0cac02..c7265964 100644 --- a/configure.in +++ b/configure.in @@ -107,25 +107,17 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME +# Required header files AC_CHECK_HEADERS([ \ - ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \ - stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \ + fcntl.h inttypes.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h \ + string.h strings.h sys/socket.h sys/time.h unistd.h \ ],,AC_MSG_ERROR([required C header missing!])) +# Optional header files AC_CHECK_HEADERS([ \ - arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \ - ],[],[],[[ - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_NETINET_IN_H - #include - #endif - ]] -) + arpa/inet.h malloc.h netinet/ip.h stdbool.h stddef.h stdint.h \ + varargs.h \ + ]) # -- Datatypes -- @@ -142,8 +134,14 @@ AC_TRY_COMPILE([ AC_MSG_RESULT(no) ]) +AC_TYPE_PID_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT8_T AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, [#include ]) @@ -159,16 +157,22 @@ AC_CHECK_LIB(socket,bind) # -- Functions -- AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_REALLOC AC_FUNC_STRFTIME +# Required functions AC_CHECK_FUNCS([ \ - bind gethostbyaddr gethostbyname gethostname inet_ntoa \ - setsid setsockopt socket strcasecmp waitpid],, + alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \ + gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \ + strchr strcspn strerror strncasecmp strrchr strspn strstr \ + ],, AC_MSG_ERROR([required function missing!])) +# Optional functions AC_CHECK_FUNCS([ \ - gai_strerror getaddrinfo getnameinfo inet_aton sigaction \ - sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r]) + gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \ + snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid]) # -- Configuration options -- -- 2.40.0