]> www.average.org Git - pam_pcsc_cr.git/commitdiff
configure: add option "--disable-openssl"
authorEugene Crosser <evgenii.cherkashin@profitbricks.com>
Wed, 15 Aug 2018 15:55:24 +0000 (17:55 +0200)
committerEugene Crosser <evgenii.cherkashin@profitbricks.com>
Wed, 15 Aug 2018 16:03:41 +0000 (18:03 +0200)
As of openssl 1.1.0, HMAC_CTX is an opaque structure and as such
cannot be allocated in the stack. One has to use HMAC_CTX_new()
that ultimately uses OPENSSL_zmalloc(), so the user has to free it
afterwards. Not something I want to do. What they where thinking?!
Richard Levitte, I am looking at you!

Signed-off-by: Eugene Crosser <evgenii.cherkashin@profitbricks.com>
configure.ac

index e6bd59a5aaf2cf37ac5fe29f608fa6cfd20011bf..8adf9404d643a1b0b55a2af197e7d67e26714411 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([pam_pcsc_cr], 0.9.4)
+AC_INIT([pam_pcsc_cr], 0.9.5)
 AC_CONFIG_SRCDIR([pam_pcsc_cr.c])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE
@@ -45,7 +45,13 @@ PKG_CHECK_MODULES([PCSC], [libpcsclite])
 CPPFLAGS="$PCSC_CFLAGS $CPPFLAGS"
 LIBS="$PCSC_LIBS $LIBS"
 
-PKG_CHECK_MODULES([OPENSSL], [libcrypto], [], [:])
+AC_ARG_ENABLE(openssl,
+       [  --disable-openssl       do not use openssl even when it is present],
+       [], [enable_openssl=yes]
+)
+AS_IF([test "x$enable_openssl" = "xyes"], [
+  PKG_CHECK_MODULES([OPENSSL], [libcrypto], [], [:])
+])
 AS_IF([test "x$OPENSSL_CFLAGS" != "x" -o "x$OPENSSL_LIBS" != "x" ], [
   use_openssl=yes
 ])