APR-Util fails to detect NSS on Gentoo GNU/Linux:

...
checking nspr/nspr.h usability... yes
checking nspr/nspr.h presence... yes
checking for nspr/nspr.h... yes
checking nss/nss.h usability... no
checking nss/nss.h presence... no
checking for nss/nss.h... no
checking for PR_Initialize in -lnspr4... no
...

I'm attaching the patch which fixes this problem.

$ nspr-config --includedir
/usr/include/nspr
$ nss-config --includedir
/usr/include/nss
$ nspr-config --libdir
/usr/lib/nspr
$ nss-config --libdir
/usr/lib/nss
$ 

-- 
Arfrever Frehtes Taifersar Arahesis
Index: build/crypto.m4
===================================================================
--- build/crypto.m4	(revision 703849)
+++ build/crypto.m4	(working copy)
@@ -139,13 +139,19 @@
   nss_have_libs=0
 
   AC_ARG_WITH([nss], 
-  [APR_HELP_STRING([--with-nss=DIR], [specify location of OpenSSL])],
+  [APR_HELP_STRING([--with-nss=DIR], [specify location of NSS])],
   [
     if test "$withval" = "yes"; then
+      nss_CPPFLAGS="-I`nspr-config --includedir` -I`nss-config --includedir`"
+      nss_LDFLAGS="-L`nspr-config --libdir` -L`nss-config --libdir`"
+      CPPFLAGS="$CPPFLAGS $nss_CPPFLAGS"
+      LDFLAGS="$LDFLAGS $nss_LDFLAGS"
       AC_CHECK_HEADERS(nspr/nspr.h nss/nss.h, [nss_have_headers=1])
       AC_CHECK_LIB(nspr4, PR_Initialize, AC_CHECK_LIB(nss3, PK11_CreatePBEV2AlgorithmID, [nss_have_libs=1],,-lnspr4))
       if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then
         apu_have_nss=1
+        APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$nss_CPPFLAGS])
+        APR_ADDTO(LDFLAGS, [$nss_LDFLAGS])
       fi
     elif test "$withval" = "no"; then
       apu_have_nss=0

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to