configure.ac 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. m4_define([SCRYPT_VERS],m4_include([scrypt-version]))
  2. AC_INIT([scrypt],SCRYPT_VERS())
  3. AC_CONFIG_AUX_DIR([config.aux])
  4. AM_INIT_AUTOMAKE()
  5. AC_PROG_CC
  6. AC_PROG_RANLIB
  7. # Don't rebuild the configure script. I'm distributing a perfectly good one.
  8. AM_MAINTAINER_MODE
  9. # Check for clock_gettime. On some systems, this is provided via librt.
  10. AC_CHECK_LIB(rt, clock_gettime)
  11. AC_CHECK_FUNCS([clock_gettime])
  12. # Check for a linuxy sysinfo syscall; and while we're doing that, check if
  13. # struct sysinfo is the old version (total RAM == totalmem) or the new
  14. # version (total RAM == totalmem * mem_unit).
  15. AC_CHECK_HEADERS([sys/sysinfo.h])
  16. AC_CHECK_FUNCS([sysinfo])
  17. AC_CHECK_TYPES([struct sysinfo], [], [], [[#include <sys/sysinfo.h>]])
  18. AC_CHECK_MEMBERS([struct sysinfo.totalram, struct sysinfo.mem_unit], [], [],
  19. [[#include <sys/sysinfo.h>]])
  20. # Check if we have <sys/param.h>, since some systems require it for sysctl
  21. # to work.
  22. AC_CHECK_HEADERS([sys/param.h])
  23. # Check for <sys/sysctl.h>. If it exists and it defines HW_USERMEM
  24. # and/or HW_MEMSIZE, we'll try using those as memory limits.
  25. AC_CHECK_HEADERS([sys/sysctl.h])
  26. # Check for posix_memalign
  27. AC_CHECK_FUNCS([posix_memalign])
  28. # Check for mmap so we can work around its absence on Minix
  29. AC_CHECK_FUNCS([mmap])
  30. AC_SYS_LARGEFILE
  31. AC_CONFIG_HEADERS([config.h])
  32. AC_CONFIG_FILES([Makefile])
  33. AC_OUTPUT