summaryrefslogtreecommitdiff
path: root/configure.in
blob: 6dacb85157f836191f73f3319f0b9cf1099cf6a3 (plain)
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
# Process this file with autoconf to produce a configure script.
AC_INIT(p11-tests, 0.1, stef@memberwebs.com)
AM_INIT_AUTOMAKE(p11-tests, 0.1)

AC_CONFIG_SRCDIR([src/p11-tests.c])
AM_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_LIBTOOL

# Depend on openssl
AC_CHECK_LIB(crypto, BN_new, ,
         [echo "ERROR: Must have openssl library."; exit 1]
)

AC_CHECK_HEADERS([openssl/rsa.h], ,
		[echo "ERROR: Must have openssl headers"; exit 1]
)

CFLAGS="$CFLAGS -g -O0 -Wall"

AC_ARG_ENABLE(strict,
		AC_HELP_STRING([--disable-strict],
		[Don't use -Werror while building]))

AC_MSG_CHECKING([Use -Werror])
if test "$enable_strict" != "no"; then
	AC_MSG_RESULT(yes)
	CFLAGS="$CFLAGS -Werror"
else
	AC_MSG_RESULT(no)
fi

AC_CONFIG_FILES([
Makefile
p11-tests.pc
doc/Makefile
src/Makefile
])
AC_OUTPUT