configure.ac 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.59)
  4. AC_INIT([dfu-util],[0.9+usbdk],[http://sourceforge.net/p/dfu-util/tickets/],,[http://dfu-util.sourceforge.net])
  5. AC_CONFIG_AUX_DIR(m4)
  6. AM_INIT_AUTOMAKE([foreign])
  7. AC_CONFIG_HEADERS([config.h])
  8. # Test for new silent rules and enable only if they are available
  9. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  10. # Checks for programs.
  11. AC_PROG_CC
  12. # Checks for libraries.
  13. # On FreeBSD the libusb-1.0 is called libusb and resides in system location
  14. AC_CHECK_LIB([usb], [libusb_init],, [native_libusb=no],)
  15. AS_IF([test x$native_libusb = xno], [
  16. PKG_CHECK_MODULES([USB], [libusb-1.0 >= 1.0.0],,
  17. AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))
  18. ])
  19. LIBS="$LIBS $USB_LIBS"
  20. CFLAGS="$CFLAGS $USB_CFLAGS"
  21. # Checks for header files.
  22. AC_HEADER_STDC
  23. AC_CHECK_HEADERS([windows.h sysexits.h unistd.h])
  24. # Checks for typedefs, structures, and compiler characteristics.
  25. AC_C_CONST
  26. AC_TYPE_SIZE_T
  27. # Checks for library functions.
  28. AC_FUNC_MEMCMP
  29. AC_CHECK_FUNCS([getpagesize nanosleep err])
  30. AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
  31. AC_OUTPUT