configure.ac 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. # Checks for AES support in OpenSSL.
  25. AC_SEARCH_LIBS([AES_encrypt], [crypto],,
  26. AC_MSG_ERROR([function AES_ENCRYPT not found]))
  27. AC_CHECK_HEADERS([openssl/aes.h],,
  28. [AC_MSG_ERROR([Unable to find the openssl/aes.h header])])
  29. # Check how we can find out the available memory.
  30. CHECK_MEMLIMIT_SUPPORT
  31. # Check for posix_memalign.
  32. AC_CHECK_FUNCS_ONCE([posix_memalign])
  33. # Check for mmap so we can work around its absence on Minix.
  34. AC_CHECK_FUNCS_ONCE([mmap])
  35. # Use 64-bit file offsets.
  36. AC_SYS_LARGEFILE
  37. # Check whether the user has requested to disable compiler warnings.
  38. CHECK_DISABLE_COMPILER_WARNINGS
  39. # Check libcperciva POSIX compatibility.
  40. CHECK_LIBCPERCIVA_POSIX([${srcdir}/libcperciva])
  41. # Check whether the user wants to install libscrypt-kdf.
  42. AC_ARG_ENABLE(libscrypt-kdf, AS_HELP_STRING([--enable-libscrypt-kdf],
  43. [Install libscrypt-kdf and development headers.]))
  44. AM_CONDITIONAL([LIBSCRYPT_KDF], [test "x${enable_libscrypt_kdf}" = "xyes"])
  45. # Write configure results and the Makefile.
  46. AC_CONFIG_HEADERS([config.h])
  47. AC_CONFIG_FILES([Makefile])
  48. AC_OUTPUT