mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	configure.in: Update checks for required and optional features
Update checks for required and optional header files, data types, and functions.
This commit is contained in:
		
							
								
								
									
										42
									
								
								configure.in
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								configure.in
									
									
									
									
									
								
							| @@ -107,25 +107,17 @@ AC_HEADER_STDC | |||||||
| AC_HEADER_SYS_WAIT | AC_HEADER_SYS_WAIT | ||||||
| AC_HEADER_TIME | AC_HEADER_TIME | ||||||
|  |  | ||||||
|  | # Required header files | ||||||
| AC_CHECK_HEADERS([ \ | AC_CHECK_HEADERS([ \ | ||||||
| 	ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \ | 	fcntl.h inttypes.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h \ | ||||||
| 	stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \ | 	string.h strings.h sys/socket.h sys/time.h unistd.h \ | ||||||
| 	],,AC_MSG_ERROR([required C header missing!])) | 	],,AC_MSG_ERROR([required C header missing!])) | ||||||
|  |  | ||||||
|  | # Optional header files | ||||||
| AC_CHECK_HEADERS([ \ | AC_CHECK_HEADERS([ \ | ||||||
| 	arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \ | 	arpa/inet.h malloc.h netinet/ip.h stdbool.h stddef.h stdint.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 |  | ||||||
| 	]] |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| # -- Datatypes -- | # -- Datatypes -- | ||||||
|  |  | ||||||
| @@ -142,8 +134,14 @@ AC_TRY_COMPILE([ | |||||||
| 	AC_MSG_RESULT(no) | 	AC_MSG_RESULT(no) | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
|  | AC_TYPE_PID_T | ||||||
| AC_TYPE_SIGNAL | AC_TYPE_SIGNAL | ||||||
| AC_TYPE_SIZE_T | 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),, | AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, | ||||||
|  [#include <arpa/inet.h>]) |  [#include <arpa/inet.h>]) | ||||||
| @@ -159,16 +157,22 @@ AC_CHECK_LIB(socket,bind) | |||||||
| # -- Functions -- | # -- Functions -- | ||||||
|  |  | ||||||
| AC_FUNC_FORK | AC_FUNC_FORK | ||||||
|  | AC_FUNC_MALLOC | ||||||
|  | AC_FUNC_REALLOC | ||||||
| AC_FUNC_STRFTIME | AC_FUNC_STRFTIME | ||||||
|  |  | ||||||
|  | # Required functions | ||||||
| AC_CHECK_FUNCS([ \ | AC_CHECK_FUNCS([ \ | ||||||
| 	bind gethostbyaddr gethostbyname gethostname inet_ntoa \ | 	alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \ | ||||||
| 	setsid setsockopt socket strcasecmp waitpid],, | 	gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \ | ||||||
|  | 	strchr strcspn strerror strncasecmp strrchr strspn strstr \ | ||||||
|  | 	],, | ||||||
| 	AC_MSG_ERROR([required function missing!])) | 	AC_MSG_ERROR([required function missing!])) | ||||||
|  |  | ||||||
|  | # Optional functions | ||||||
| AC_CHECK_FUNCS([ \ | AC_CHECK_FUNCS([ \ | ||||||
| 	gai_strerror getaddrinfo getnameinfo inet_aton sigaction \ | 	gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \ | ||||||
| 	sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r]) | 	snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid]) | ||||||
|  |  | ||||||
| # -- Configuration options -- | # -- Configuration options -- | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton