-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
65 lines (54 loc) · 1.47 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
# Copyright (C) 2022 IBM Corp.
# SPDX-License-Identifier: Apache-2.0
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.71])
AC_INIT([openssl-pkcs11-sign-provider],
[1.0.1],
[https://github.com/opencryptoki/openssl-pkcs11-sign-provider/issues]
)
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT([shared disable-static])
PKG_PROG_PKG_CONFIG
# Checks for libraries.
PKG_CHECK_MODULES(
[OPENSSL],[libcrypto >= 3.0.8, libssl],
,
[AC_MSG_ERROR([libcrypto >= 3.0.8 is required])]
)
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([memset strchr strtoul])
# Compile flags
m4_ifdef([AX_CHECK_COMPILE_FLAG],
[AX_CHECK_COMPILE_FLAG(
[-std=c99],
[CFLAGS="$CFLAGS -std=c99"],
AC_MSG_ERROR([C compiler must support C99 standard]))],
[AC_MSG_ERROR([AX_CHECK_COMPILE_FLAG macro is missing.])]
)
STD_CFLAGS="-Wall -Wextra"
AC_SUBST([STD_CFLAGS])
AC_SUBST([SHARED_EXT], $(eval echo "${shrext_cmds}"))
AC_CONFIG_FILES([Makefile
man/Makefile
src/Makefile
tests/Makefile])
AC_OUTPUT