Module: ngircd.git Branch: master Commit: 47ad9afcf38d91059dd23dc2e6f6c2d9d4c3ad80 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=47ad9...
Author: Alexander Barton alex@barton.de Date: Tue Sep 11 14:32:17 2012 +0200
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 0f0cac0..c726596 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 <sys/types.h> - #endif - #ifdef HAVE_SYS_SOCKET_H - #include <sys/socket.h> - #endif - #ifdef HAVE_NETINET_IN_H - #include <netinet/in.h> - #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 <arpa/inet.h>]) @@ -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 --