]>
Commit | Line | Data |
---|---|---|
0c1f3509 MG |
1 | AC_PREREQ([2.69]) |
2 | AC_INIT([scrypt],1.2.1, | |
3 | [https://github.com/Tarsnap/scrypt],[scrypt],[http://www.tarsnap.com/scrypt/]) | |
4 | AC_CONFIG_SRCDIR([lib/scryptenc/scryptenc.c]) | |
5 | AC_CONFIG_AUX_DIR([config.aux]) | |
6 | AC_CONFIG_MACRO_DIR([m4]) | |
7 | AM_INIT_AUTOMAKE([foreign subdir-objects -Wall]) | |
8 | ||
9 | # Checks for programs. | |
10 | AC_PROG_CC_C99 | |
11 | AC_PROG_RANLIB | |
12 | AM_PROG_AR | |
13 | ||
14 | # Don't rebuild the configure script. I'm distributing a perfectly good one. | |
15 | AM_MAINTAINER_MODE | |
16 | ||
17 | # Checks for libraries. | |
18 | ||
19 | # Check for clock_gettime. On some systems, this is provided via librt. | |
20 | AC_SEARCH_LIBS([clock_gettime], [rt]) | |
21 | AC_CHECK_FUNCS([clock_gettime]) | |
22 | ||
23 | AC_SEARCH_LIBS([AES_encrypt], [crypto],, | |
24 | AC_MSG_ERROR([function AES_ENCRYPT not found])) | |
25 | ||
26 | # Check for a linuxy sysinfo syscall; and while we're doing that, check if | |
27 | # struct sysinfo is the old version (total RAM == totalmem) or the new | |
28 | # version (total RAM == totalmem * mem_unit). | |
29 | AC_CHECK_HEADERS([sys/sysinfo.h]) | |
30 | AC_CHECK_FUNCS([sysinfo]) | |
31 | AC_CHECK_TYPES([struct sysinfo], [], [], [[#include <sys/sysinfo.h>]]) | |
32 | AC_CHECK_MEMBERS([struct sysinfo.totalram, struct sysinfo.mem_unit], [], [], | |
33 | [[#include <sys/sysinfo.h>]]) | |
34 | ||
35 | # Check if we have <sys/param.h>, since some systems require it for sysctl | |
36 | # to work. | |
37 | AC_CHECK_HEADERS([sys/param.h]) | |
38 | ||
39 | # Check if we have <openssl/aes.h>, to fix the make failing when configure | |
40 | # passes. | |
41 | AC_CHECK_HEADERS([openssl/aes.h],, | |
42 | [AC_MSG_ERROR([Unable to find the openssl/aes.h header])]) | |
43 | ||
44 | # Check for <sys/sysctl.h>. If it exists and it defines HW_USERMEM | |
45 | # and/or HW_MEMSIZE, we'll try using those as memory limits. | |
46 | AC_CHECK_HEADERS([sys/sysctl.h]) | |
47 | ||
48 | # Check for posix_memalign | |
49 | AC_CHECK_FUNCS([posix_memalign]) | |
50 | ||
51 | # Check for mmap so we can work around its absence on Minix | |
52 | AC_CHECK_FUNCS([mmap]) | |
53 | ||
54 | AC_SYS_LARGEFILE | |
55 | ||
56 | # Check whether the user has requested to disable compiler warnings | |
57 | AC_MSG_CHECKING([compiler_warnings]) | |
58 | AC_ARG_ENABLE(compiler_warnings, | |
59 | AS_HELP_STRING([--disable-compiler-warnings], | |
60 | [Do not request compiler warnings. @<:@default=enabled@:>@]), | |
61 | [ac_compiler_warnings=$enableval], | |
62 | [ac_compiler_warnings=yes]) | |
63 | AC_MSG_RESULT([${ac_compiler_warnings}]) | |
64 | AS_IF([test x${ac_compiler_warnings} = xyes], | |
65 | [AX_CFLAGS_WARN_ALL]) | |
66 | ||
67 | AC_CONFIG_HEADERS([config.h]) | |
68 | AC_CONFIG_FILES([Makefile]) | |
69 | AC_OUTPUT |