diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-12-01 15:01:52 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-12-01 15:01:52 +0300 |
commit | e87044f7a3420cd57200db9cb368b75e2862bb1b (patch) | |
tree | 872500b7ef8785552fae926c394a694608649b4d | |
parent | 06476807a2f5b977cac710c5665e29a7f9bb15c8 (diff) | |
download | libmicrohttpd-e87044f7a3420cd57200db9cb368b75e2862bb1b.tar.gz libmicrohttpd-e87044f7a3420cd57200db9cb368b75e2862bb1b.zip |
configure: header detection fixes
Reordered headers detection to allow detect headers which require
inclusion of other headers before them.
Fixed detection of network/socket headers as on some platforms they
require specific headers to be included before.
-rw-r--r-- | configure.ac | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index d0e957f6..335e5d2f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1095,16 +1095,49 @@ fd = epoll_create1(EPOLL_CLOEXEC);]])], | |||
1095 | AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])])) | 1095 | AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 function.])])) |
1096 | 1096 | ||
1097 | # Check for headers that are ALWAYS required | 1097 | # Check for headers that are ALWAYS required |
1098 | AC_CHECK_HEADERS_ONCE([fcntl.h errno.h limits.h stdio.h stdint.h], [], | 1098 | AC_CHECK_HEADERS_ONCE([stdio.h string.h stdint.h errno.h limits.h fcntl.h], [], |
1099 | [AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers files])], [AC_INCLUDES_DEFAULT]) | 1099 | [AC_MSG_ERROR([Compiling libmicrohttpd requires standard POSIX headers files])], [AC_INCLUDES_DEFAULT]) |
1100 | 1100 | ||
1101 | # Check for optional headers | 1101 | # Check for basic optional headers |
1102 | AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h time.h sys/mman.h sys/ioctl.h \ | 1102 | AC_CHECK_HEADERS([stddef.h stdlib.h inttypes.h sys/types.h sys/stat.h unistd.h], [], [], [AC_INCLUDES_DEFAULT]) |
1103 | sys/socket.h sys/select.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h arpa/inet.h \ | 1103 | |
1104 | endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h sys/byteorder.h machine/param.h sys/isa_defs.h \ | 1104 | # Check for clock-specific optional headers |
1105 | signal.h sys/stat.h \ | 1105 | AC_CHECK_HEADERS([sys/time.h time.h], [], [], [AC_INCLUDES_DEFAULT]) |
1106 | inttypes.h stddef.h stdlib.h unistd.h \ | 1106 | |
1107 | sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT]) | 1107 | # Check for system information and parameters optional headers |
1108 | AC_CHECK_HEADERS([endian.h machine/endian.h sys/endian.h sys/byteorder.h \ | ||
1109 | sys/machine.h machine/param.h sys/param.h sys/isa_defs.h \ | ||
1110 | sys/ioctl.h], [], [], [AC_INCLUDES_DEFAULT]) | ||
1111 | |||
1112 | # Check for network and sockets optional headers | ||
1113 | AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in.h arpa/inet.h \ | ||
1114 | netinet/ip.h netinet/tcp.h net/if.h \ | ||
1115 | netdb.h sockLib.h inetLib.h], [], [], | ||
1116 | [AC_INCLUDES_DEFAULT | ||
1117 | [ | ||
1118 | #ifdef HAVE_SYS_TYPES_H | ||
1119 | #include <sys/types.h> | ||
1120 | #endif /* HAVE_SYS_TYPES_H */ | ||
1121 | #ifdef HAVE_INTTYPES_H | ||
1122 | #include <inttypes.h> | ||
1123 | #endif /* HAVE_INTTYPES_H */ | ||
1124 | #ifdef HAVE_SYS_SOCKET_H | ||
1125 | #include <sys/socket.h> | ||
1126 | #endif /* HAVE_SYS_SOCKET_H */ | ||
1127 | #ifdef HAVE_NETINET_IN_H | ||
1128 | #include <netinet/in.h> | ||
1129 | #endif /* HAVE_NETINET_IN_H */ | ||
1130 | #ifdef HAVE_NETINET_IP_H | ||
1131 | #include <netinet/ip.h> | ||
1132 | #endif /* HAVE_NETINET_IP_H */ | ||
1133 | #ifdef HAVE_NETINET_TCP_H | ||
1134 | #include <netinet/tcp.h> | ||
1135 | #endif /* HAVE_NETINET_TCP_H */ | ||
1136 | ]] | ||
1137 | ) | ||
1138 | |||
1139 | # Check for other optional headers | ||
1140 | AC_CHECK_HEADERS([sys/msg.h sys/mman.h signal.h], [], [], [AC_INCLUDES_DEFAULT]) | ||
1108 | 1141 | ||
1109 | AC_CHECK_HEADER([[search.h]], | 1142 | AC_CHECK_HEADER([[search.h]], |
1110 | [ | 1143 | [ |