1 | AC_INIT(libenet, 6-6-2007) |
---|
2 | AM_INIT_AUTOMAKE(libenet.a, 6-6-2007) |
---|
3 | |
---|
4 | AC_PROG_CC |
---|
5 | AC_PROG_RANLIB |
---|
6 | |
---|
7 | AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)]) |
---|
8 | AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)]) |
---|
9 | AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)]) |
---|
10 | AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)]) |
---|
11 | AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)]) |
---|
12 | AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)]) |
---|
13 | |
---|
14 | AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>]) |
---|
15 | |
---|
16 | AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], , |
---|
17 | #include <sys/types.h> |
---|
18 | #include <sys/socket.h> |
---|
19 | ) |
---|
20 | |
---|
21 | AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN])) |
---|
22 | AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN])) |
---|
23 | |
---|
24 | AC_MSG_CHECKING(whether to use CRC32) |
---|
25 | AC_ARG_ENABLE(crc32, |
---|
26 | [ --enable-crc32 enable CRC32 packet verification ], |
---|
27 | [if test "$enableval" = yes; then |
---|
28 | AC_MSG_RESULT(yes) |
---|
29 | AC_DEFINE(USE_CRC32) |
---|
30 | else |
---|
31 | AC_MSG_RESULT(no) |
---|
32 | fi], |
---|
33 | [AC_MSG_RESULT(no)]) |
---|
34 | |
---|
35 | AC_OUTPUT([Makefile include/Makefile include/enet/Makefile]) |
---|
36 | |
---|