[pkg-opensc-commit] [libp11] 28/33: Use enginesdir from libcrypto.pc if it provides it

Eric Dorland eric at moszumanska.debian.org
Mon Sep 19 02:11:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 34860f09e599ce4ba87afd659c9d3c80e47278a0
Author: David Woodhouse <David.Woodhouse at intel.com>
Date:   Sat Aug 27 22:48:58 2016 +0100

    Use enginesdir from libcrypto.pc if it provides it
    
    Which it should from OpenSSL 1.1 onwards, and distributions which mess
    around with the engine directory could also add it for earlier versions.
    
    cf. https://github.com/openssl/openssl/pull/1501
---
 configure.ac | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9713310..f6083dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,26 +102,29 @@ AC_ARG_WITH(
 	[AS_HELP_STRING([--with-enginesdir], [OpenSSL engines directory])],
 	[enginesdir="${withval}"],
 	[
-		libcryptodir="`$PKG_CONFIG --variable=libdir --silence-errors libcrypto || \
+		enginesdir="`$PKG_CONFIG --variable=enginesdir --silence-errors libcrypto`"
+		if test "${enginesdir}" = ""; then
+		    libcryptodir="`$PKG_CONFIG --variable=libdir --silence-errors libcrypto || \
 			$PKG_CONFIG --variable=libdir openssl`"
-		case "`$PKG_CONFIG --modversion --silence-errors libcrypto || \
+		    case "`$PKG_CONFIG --modversion --silence-errors libcrypto || \
 			$PKG_CONFIG --modversion openssl`" in
-		1.1.*) # Predicted engines directory prefix for OpenSSL 1.1.x
-			debian_ssl_prefix="openssl-1.1.0";;
-		1.0.*) # Engines directory prefix for OpenSSL 1.0.x
-			debian_ssl_prefix="openssl-1.0.0";;
-		*) # Engines directory prefix for OpenSSL 0.9.x
-			debian_ssl_prefix="ssl";;
-		esac
-		if test -d "$libcryptodir/$debian_ssl_prefix/engines"; then
+			1.1.*) # Predicted engines directory prefix for OpenSSL 1.1.x
+			    debian_ssl_prefix="openssl-1.1.0";;
+			1.0.*) # Engines directory prefix for OpenSSL 1.0.x
+			    debian_ssl_prefix="openssl-1.0.0";;
+			*) # Engines directory prefix for OpenSSL 0.9.x
+			    debian_ssl_prefix="ssl";;
+		    esac
+		    if test -d "$libcryptodir/$debian_ssl_prefix/engines"; then
 			# Debian-based OpenSSL package (for example Ubuntu)
 			enginesdir="$libcryptodir/$debian_ssl_prefix/engines"
-		else # Default OpenSSL engines directory
+		    else # Default OpenSSL engines directory
 			enginesdir="$libcryptodir/engines"
-		fi
-		if test "${prefix}" != "NONE" -o "${exec_prefix}" != "NONE"; then
+		    fi
+		    if test "${prefix}" != "NONE" -o "${exec_prefix}" != "NONE"; then
 			# Override the autodetected value with the default
 			enginesdir="${libdir}"
+		    fi
 		fi
 	]
 )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list