blob: 60958f763efdc5361ebd1140b8c899a6ff4f6a9f [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301From 672bb4ee625da3141ba6cecb0601c7563de4c483 Mon Sep 17 00:00:00 2001
2From: Armin Kuster <akuster808@gmail.com>
3Date: Thu, 13 Oct 2016 02:03:56 -0700
4Subject: [PATCH 1/4] swtpm: add new package
5
6Upstream-Status: Inappropriate [OE config]
7
8Signed-off-by: Armin Kuster <akuster808@gmail.com>
9
10Rebased to current tip.
11
12Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
13
14---
15 configure.ac | 34 ++++++++++------------------------
16 1 file changed, 10 insertions(+), 24 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index abf5be1..85ed6ac 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -395,31 +395,17 @@ CFLAGS="$CFLAGS -Wformat -Wformat-security"
23 dnl We have to make sure libtpms is using the same crypto library
24 dnl to avoid problems
25 AC_MSG_CHECKING([the crypto library libtpms is using])
26-dirs=$($CC $CFLAGS -Xlinker --verbose 2>/dev/null | \
27- sed -n '/SEARCH_DIR/p' | \
28- sed 's/SEARCH_DIR("\(@<:@^"@:>@*\)"); */\1 /g' | \
29- sed 's|=/|/|g')
30-for dir in $dirs $LIBRARY_PATH; do
31- if test -r $dir/libtpms.so; then
32- if test -n "`ldd $dir/libtpms.so | grep libcrypto.so`"; then
33- libtpms_cryptolib="openssl"
34- break
35- fi
36- if test -n "`ldd $dir/libtpms.so | grep libnss3.so`"; then
37- libtpms_cryptolib="freebl"
38- break
39- fi
40+dir="$SEARCH_DIR"
41+if test -r $dir/libtpms.so; then
42+ if test -n "`ldd $dir/libtpms.so | grep libcrypto.so`"; then
43+ libtpms_cryptolib="openssl"
44+ break
45 fi
46- case $host_os in
47- cygwin|openbsd*)
48- if test -r $dir/libtpms.a; then
49- if test -n "$(nm $dir/libtpms.a | grep "U AES_encrypt")"; then
50- libtpms_cryptolib="openssl"
51- fi
52- fi
53- ;;
54- esac
55-done
56+ if test -n "`ldd $dir/libtpms.so | grep libnss3.so`"; then
57+ libtpms_cryptolib="freebl"
58+ break
59+ fi
60+fi
61
62 if test -z "$libtpms_cryptolib"; then
63 AC_MSG_ERROR([Could not determine libtpms crypto library.])
64--
652.11.0
66