configure.ac 1.1 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. AC_PROG_RANLIB
  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_UINT16_T
  23. AC_TYPE_UINT32_T
  24. AC_TYPE_UINT8_T
  25. AC_CHECK_DECLS([IPTOS_LOWDELAY],
  26. [have_iptos_lowdelay=yes], [have_iptos_lowdelay=no],
  27. [#include <netinet/ip.h>])
  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. ])