configure.ac 990 B

12345678910111213141516171819202122232425262728293031
  1. AC_INIT([libenet], [1.3.6])
  2. AC_CONFIG_SRCDIR([include/enet/enet.h])
  3. AM_INIT_AUTOMAKE([foreign])
  4. AM_MAINTAINER_MODE([enable])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_PROG_CC
  7. AC_PROG_LIBTOOL
  8. AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
  9. AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
  10. AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)])
  11. AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)])
  12. AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)])
  13. AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)])
  14. AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])
  15. AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], ,
  16. #include <sys/types.h>
  17. #include <sys/socket.h>
  18. )
  19. AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
  20. AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
  21. AC_CONFIG_FILES([Makefile
  22. libenet.pc])
  23. AC_OUTPUT