diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-12-02 15:28:08 -0800 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-12-04 15:44:33 +0100 |
commit | 8c6d1278fea6b276989b0cbe40b6a5d1f447f51f (patch) | |
tree | dc1ef65ff75a7463f6793b5a562e29ff7c1c3be8 /configure.ac | |
parent | 02c468d5d54fc9594f4f3a6ee7497abf4de4602b (diff) | |
download | gnutls-8c6d1278fea6b276989b0cbe40b6a5d1f447f51f.tar.gz |
Fix inability to find libtspi (trousers) on openSUSE
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
/usr/lib/lib64)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 954829efe6..4278d2ba94 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 -default_trousers_lib="/usr/lib64/libtspi.so.1" -else -default_trousers_lib="/usr/lib/libtspi.so.1" -fi +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 +done 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" && test -z "$ac_trousers_lib"; then + AC_MSG_ERROR([[ + *** + *** unable to find trousers library, please specify with --with-trousers-lib=<lib file> + *** + ]]) +fi + AC_DEFINE_UNQUOTED([TROUSERS_LIB], ["$ac_trousers_lib"], [the location of the trousers library]) AC_SUBST(TROUSERS_LIB) |