configure.ac 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.63)
  4. AC_INIT([libmodbus],[2.1.0],[stephane.raimbault@gmail.com])
  5. AC_CONFIG_SRCDIR([src/modbus.c])
  6. AC_CONFIG_HEADERS([config.h])
  7. AM_INIT_AUTOMAKE([1.11])
  8. # enable nice build output on automake1.11
  9. m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
  10. # Checks for programs.
  11. AC_PROG_CC
  12. AC_PROG_CXX
  13. AC_PROG_MAKE_SET
  14. LT_INIT([disable-static])
  15. # Checks for header files.
  16. AC_HEADER_STDC
  17. AC_CHECK_HEADERS([termios.h sys/time.h unistd.h errno.h limits.h fcntl.h sys/types.h sys/socket.h sys/ioctl.h netinet/in.h netinet/ip.h netinet/tcp.h arpa/inet.h])
  18. # Checks for typedefs, structures, and compiler characteristics.
  19. AC_C_CONST
  20. AC_TYPE_SIZE_T
  21. AC_HEADER_TIME
  22. # AC_TYPE_UINT*_T: not supported by autoconf-2.59 of CentOS 5.3
  23. # AC_TYPE_UINT16_T
  24. # AC_TYPE_UINT32_T
  25. # AC_TYPE_UINT8_T
  26. # Cygwin defines IPTOS_LOWDELAY but can't handle that flag so it's necessary to
  27. # workaround that problem and Cygwin doesn't define MSG_DONTWAIT.
  28. AC_CHECK_DECLS([__CYGWIN__])
  29. # Checks for library functions.
  30. AC_FUNC_FORK
  31. AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror])
  32. AC_CONFIG_FILES([
  33. Makefile
  34. src/Makefile
  35. tests/Makefile
  36. modbus.pc
  37. ])
  38. AC_OUTPUT