[gnutls-devel] [PATCH] Fix inability to find libtspi (trousers) on openSUSE

James Bottomley James.Bottomley at HansenPartnership.com
Sat Dec 3 00:28:08 CET 2016

For distro reasons, the path on openSUSE is /lib[64]/libtspi.so.1
which the current code doesn't find.  Fix this by having it search all
viable system library locations (/lib /lib64 /usr/lib and

Signed-off-by: James Bottomley <James.Bottomley at HansenPartnership.com>
 configure.ac | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 954829e..0be0818 100644
--- a/configure.ac
+++ b/configure.ac
@@ -643,16 +643,24 @@ fi
 AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
-if test -f "/usr/lib64/libtspi.so.1";then
+for l in /usr/lib /usr/lib64 /lib /lib64; do
+    if test -f "${l}/libtspi.so.1";then
+        default_trousers_lib="${l}/libtspi.so.1"
+    fi
 AC_ARG_WITH(trousers-lib, AS_HELP_STRING([--with-trousers-lib=LIB],
                                  [set the location of the trousers library]),
             ac_trousers_lib=$withval, ac_trousers_lib=$default_trousers_lib)
+if test "$with_tpm" != "no" -a -z "$ac_trousers_lib"; then
+    AC_MSG_ERROR([[
+  ***
+  *** unable to find trousers library, please specify with --with-trousers-lib=<lib file>
+  ***
+  ]])
 AC_DEFINE_UNQUOTED([TROUSERS_LIB], ["$ac_trousers_lib"], [the location of the trousers library])

More information about the Gnutls-devel mailing list