summaryrefslogtreecommitdiffstats
path: root/enet/configure.in
blob: 8a67c05801b9d05965bad7461ad9bac5f50b6037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
AC_INIT(libenet, 12-12-2006)
AM_INIT_AUTOMAKE(libenet.a, 12-12-2006)

AC_PROG_CC
AC_PROG_RANLIB

AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)])
AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)])
AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)])
AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)])

AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])

AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], , 
              #include <sys/types.h>
              #include <sys/socket.h>
)

AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))

AC_MSG_CHECKING(whether to use CRC32)
AC_ARG_ENABLE(crc32,
    [  --enable-crc32   enable CRC32 packet verification ],
    [if test "$enableval" = yes; then
        AC_MSG_RESULT(yes)
        AC_DEFINE(USE_CRC32)
     else
        AC_MSG_RESULT(no)
     fi],
    [AC_MSG_RESULT(no)])

AC_OUTPUT([Makefile include/Makefile include/enet/Makefile])

bues.ch cgit interface