-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.ac
76 lines (60 loc) · 2.03 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([VES], [1.28], [bugs@vesvault.com])
AC_CONFIG_SRCDIR([src/ves-util.c])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.0 subdir-objects])
AM_MAINTAINER_MODE([disable])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_PROG_RANLIB
# Checks for libraries.
AC_ARG_WITH([oqs],
[AS_HELP_STRING([--with-oqs],
[enable experimental support for liboqs])],
[],
[])
LIBOQS=
AS_IF([test "x$with_oqs" != xno],
[AC_CHECK_LIB([oqs], [OQS_KEM_new],
[AC_SUBST([LIBOQS], ["-loqs"])
AC_DEFINE([HAVE_LIBOQS], [1],
[Define if you have liboqs])
AM_CONDITIONAL([HAVE_LIBOQS], [test 1])
],
[AS_IF([test "x$with_oqs" == x], [], [AC_MSG_FAILURE(
[--with-oqs was given, but test for liboqs failed])])],
[-lcrypto]
)],
[AM_CONDITIONAL([HAVE_LIBOQS], [test])]
)
AC_ARG_WITH([keystore],
[AS_HELP_STRING([--with-keystore],
[build with a keystore module from lib/KeyStore])],
[],
[with_keystore=cli])
LIBVES_KEYSTORE=
AS_IF([test "x$with_keystore" != xno],
[AC_SUBST([LIBVES_KEYSTORE], [$with_keystore])
AC_DEFINE_UNQUOTED([LIBVES_KEYSTORE], [$with_keystore],
[Define the keystore module from lib/KeyStore])
AM_CONDITIONAL([LIBVES_KEYSTORE], [test 1])
],
[AM_CONDITIONAL([LIBVES_KEYSTORE], [test])]
)
# Checks for header files.
AC_CHECK_HEADERS([malloc.h string.h stddef.h fcntl.h unistd.h sys/ioctl.h openssl/evp.h curl/curl.h termios.h windows.h oqs/oqs.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strdup strndup memmove memset strerror])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile])
AC_OUTPUT