configure.ac 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_UINT*_T: not supported by autoconf-2.59 of CentOS 5.3
  22. # AC_TYPE_UINT16_T
  23. # AC_TYPE_UINT32_T
  24. # AC_TYPE_UINT8_T
  25. # Cygwin defines IPTOS_LOWDELAY but can't handle that flag so it's necessary to
  26. # workaround that problem and Cygwin doesn't define MSG_DONTWAIT.
  27. AC_CHECK_DECLS([__CYGWIN__])
  28. # Checks for library functions.
  29. AC_FUNC_FORK
  30. AC_FUNC_MALLOC
  31. AC_FUNC_SELECT_ARGTYPES
  32. AC_TYPE_SIGNAL
  33. AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror])
  34. AC_OUTPUT([
  35. Makefile
  36. src/Makefile
  37. tests/Makefile
  38. modbus.pc
  39. ])