Skip to content

Commit 3118c42

Browse files
flichtenheldcron2
authored andcommitted
configure.ac: Remove use of PKCS11_HELPER_LIBS in mbedTLS checks
This code was copied over and over since many years, since commit 9a3f670 ("Fixed autoconf script to properly detect missing pkcs11 with polarssl"). It is unclear what exact purpose it served back then but probably it is obsolete. It is definitely wrong since it means that you get PKCS11_HELPER_LIBS even if you do not specify --enable-pkcs11. Change-Id: I317be5253d6563906dd3826421dc81f737beba76 Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Arne Schwabe <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg32187.html Signed-off-by: Gert Doering <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1423 (cherry picked from commit ed690d1) Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34913.html Signed-off-by: Gert Doering <[email protected]>
1 parent 40420d4 commit 3118c42

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

configure.ac

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -801,14 +801,6 @@ case "${with_mem_check}" in
801801
;;
802802
esac
803803

804-
PKG_CHECK_MODULES(
805-
[PKCS11_HELPER],
806-
[libpkcs11-helper-1 >= 1.11],
807-
[have_pkcs11_helper="yes"],
808-
[]
809-
)
810-
811-
812804
if test "$enable_dco" != "no"; then
813805
enable_dco_arg="$enable_dco"
814806
if test "${enable_iproute2}" = "yes"; then
@@ -1022,13 +1014,12 @@ elif test "${with_crypto_library}" = "mbedtls"; then
10221014
[mbedtls_ssl_init],
10231015
[MBEDTLS_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto"],
10241016
[AC_MSG_ERROR([Could not find mbed TLS.])],
1025-
[${PKCS11_HELPER_LIBS}]
10261017
)
10271018
fi
10281019
fi
10291020

1030-
CFLAGS="${MBEDTLS_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
1031-
LIBS="${MBEDTLS_LIBS} ${PKCS11_HELPER_LIBS} ${LIBS}"
1021+
CFLAGS="${MBEDTLS_CFLAGS} ${CFLAGS}"
1022+
LIBS="${MBEDTLS_LIBS} ${LIBS}"
10321023

10331024
AC_MSG_CHECKING([mbedtls version])
10341025
AC_COMPILE_IFELSE(
@@ -1399,7 +1390,12 @@ if test "${enable_comp_stub}" = "yes"; then
13991390
fi
14001391

14011392
if test "${enable_pkcs11}" = "yes"; then
1402-
test "${have_pkcs11_helper}" != "yes" && AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing])
1393+
PKG_CHECK_MODULES(
1394+
[PKCS11_HELPER],
1395+
[libpkcs11-helper-1 >= 1.11],
1396+
[have_pkcs11_helper="yes"],
1397+
[AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing])]
1398+
)
14031399
OPTIONAL_PKCS11_HELPER_CFLAGS="${PKCS11_HELPER_CFLAGS}"
14041400
OPTIONAL_PKCS11_HELPER_LIBS="${PKCS11_HELPER_LIBS}"
14051401
AC_DEFINE([ENABLE_PKCS11], [1], [Enable PKCS11])

0 commit comments

Comments
 (0)