configure.ac 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.59)
  4. AC_INIT(libmodbus, 2.0.3, stephane.raimbault@gmail.com)
  5. AC_CONFIG_SRCDIR([src/modbus.c])
  6. AC_CONFIG_HEADERS([config.h])
  7. AM_INIT_AUTOMAKE
  8. AM_DISABLE_STATIC
  9. # Checks for programs.
  10. AC_PROG_CC
  11. AC_PROG_CXX
  12. AC_PROG_MAKE_SET
  13. AC_PROG_LIBTOOL
  14. # Checks for header files.
  15. AC_HEADER_STDC
  16. 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])
  17. # Checks for typedefs, structures, and compiler characteristics.
  18. AC_C_CONST
  19. AC_TYPE_SIZE_T
  20. AC_HEADER_TIME
  21. AC_TYPE_UINT16_T
  22. AC_TYPE_UINT32_T
  23. AC_TYPE_UINT8_T
  24. # Cygwin defines IPTOS_LOWDELAY but can't handle that flag so it's necessary to
  25. # workaround that problem and Cygwin doesn't define MSG_DONTWAIT.
  26. AC_CHECK_DECLS([__CYGWIN__])
  27. # Checks for library functions.
  28. AC_FUNC_FORK
  29. AC_FUNC_MALLOC
  30. AC_FUNC_SELECT_ARGTYPES
  31. AC_TYPE_SIGNAL
  32. AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror])
  33. AC_OUTPUT([
  34. Makefile
  35. src/Makefile
  36. tests/Makefile
  37. modbus.pc
  38. ])