configure.ac 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. AC_PREREQ([2.69])
  2. AC_INIT([scrypt],[m4_esyscmd([sh get-version.sh])],
  3. [https://github.com/Tarsnap/scrypt],[scrypt],[http://www.tarsnap.com/scrypt/])
  4. # Safety check: make sure that the srcdir contains this file.
  5. AC_CONFIG_SRCDIR([lib/scryptenc/scryptenc.c])
  6. # Use auxiliary subscripts from this subdirectory (cleans up root).
  7. AC_CONFIG_AUX_DIR([config.aux])
  8. # Directory for our additional macros.
  9. AC_CONFIG_MACRO_DIR([m4])
  10. # Compute $target_os and related variables.
  11. AC_CANONICAL_TARGET
  12. AM_INIT_AUTOMAKE([foreign subdir-objects])
  13. # Checks for programs.
  14. m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
  15. AM_PROG_AR
  16. LT_INIT
  17. # Don't rebuild the configure script. I'm distributing a perfectly good one.
  18. AM_MAINTAINER_MODE
  19. # Get the POSIX sh early, in case the configure script causes
  20. # `command -p getconf` to fail in a broken environment.
  21. CHECK_POSIX_SH
  22. # Check if we need -std=c99 in LDFLAGS (for gcc on Solaris).
  23. CHECK_SOLARIS_C99
  24. # Check if we need to add extra paths to CPPFLAGS and LDFLAGS for macOS.
  25. CHECK_DARWIN_PATHS
  26. # Checks for AES support in OpenSSL.
  27. AC_SEARCH_LIBS([AES_encrypt], [crypto],,
  28. AC_MSG_ERROR([function AES_ENCRYPT not found]))
  29. AC_CHECK_HEADERS([openssl/aes.h],,
  30. [AC_MSG_ERROR([Unable to find the openssl/aes.h header])])
  31. # Check how we can find out the available memory.
  32. CHECK_MEMLIMIT_SUPPORT
  33. # Check for posix_memalign.
  34. AC_CHECK_FUNCS_ONCE([posix_memalign])
  35. # Check for mmap so we can work around its absence on Minix.
  36. AC_CHECK_FUNCS_ONCE([mmap])
  37. # Use 64-bit file offsets.
  38. AC_SYS_LARGEFILE
  39. # Check whether the user has requested to disable compiler warnings.
  40. CHECK_DISABLE_COMPILER_WARNINGS
  41. # Check libcperciva POSIX compatibility.
  42. CHECK_LIBCPERCIVA_POSIX([${srcdir}/libcperciva])
  43. # Check whether the user wants to install libscrypt-kdf.
  44. AC_ARG_ENABLE(libscrypt-kdf, AS_HELP_STRING([--enable-libscrypt-kdf],
  45. [Install libscrypt-kdf and development headers.]))
  46. AM_CONDITIONAL([LIBSCRYPT_KDF], [test "x${enable_libscrypt_kdf}" = "xyes"])
  47. # Write configure results and the Makefile.
  48. AC_CONFIG_HEADERS([config.h])
  49. AC_CONFIG_FILES([Makefile])
  50. AC_OUTPUT