]> git.proxmox.com Git - swtpm.git/commitdiff
Check for missing freebl headers and freebl lib
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 18 Dec 2014 16:04:22 +0000 (11:04 -0500)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 18 Dec 2014 16:04:22 +0000 (11:04 -0500)
Add a check for missing freebl header blapi.h (missing in Ubuntu)
and missing freebl static library that provides AES_CreateContext.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
configure.ac

index a22bfd5887eb4d591e240556aa0152494499a014..efb05dc35c01296d7123a188a63edc1a5b04efb8 100644 (file)
@@ -113,6 +113,19 @@ dnl On RHEL 7 ppc64 we need an explicit -lfreebl
 NSS_LIBS="$NSS_LIBS -lfreebl"
 AC_SUBST([NSS_LIBS])
 
+# Check for missing headers
+CPPFLAGS="$NSS_CFLAGS"
+AC_CHECK_HEADERS([blapi.h],[],
+                AC_MSG_ERROR(nss-softokn-freebl-devel/libnss3-dev is missing blapi.h))
+# Check for missing freebl library or missing library functions
+LIBS_save="$LIBS"
+LIBS="$(nss-config --libs) $(nspr-config --libs)"
+AC_SEARCH_LIBS([AES_CreateContext], [freebl],[],
+               AC_MSG_ERROR("Could not find AES_CreateContext(). Is nss-softokn-freebl-devel/libnss3-dev installed?"),
+               [])
+LIBS="$LIBS_save"
+CPPFLAGS=""
+
 LIBTASN1_LIBS=$(pkg-config --libs libtasn1)
 if test $? -ne 0; then
        AC_MSG_ERROR("Is libtasn1-devel installed? -- could not get libs for libtasn1")