This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] When using the Mozilla NSS library for cryptography, include the NSPR header files


When configuring GNU libc to build using the Mozilla NSS library
for cryptography (--enable-nss-crypt option), also include the
NSPR header files along with the Mozilla NSS library header files.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
---
 configure    |    6 +++++-
 configure.ac |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

--- glibc-31052016-0900GMT/configure	2016-05-30 13:25:35.299696688 +0200
+++ glibc-configure-nss-crypt-include-nspr-headers/configure	2016-05-31 13:57:28.117571376 +0200
@@ -3501,8 +3501,12 @@ if test x$nss_crypt = xyes; then
   if test $? -ne 0; then
     as_fn_error $? "cannot find include directory with nss-config" "$LINENO" 5
   fi
+  nspr_includes=-I$(nspr-config --includedir 2>/dev/null)
+  if test $? -ne 0; then
+    as_fn_error $? "cannot find include directory with nspr-config" "$LINENO" 5
+  fi
   old_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $nss_includes"
+  CFLAGS="$CFLAGS $nss_includes $nspr_includes"
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
--- glibc-31052016-0900GMT/configure.ac	2016-05-30 13:25:35.299696688 +0200
+++ glibc-configure-nss-crypt-include-nspr-headers/configure.ac	2016-05-31 13:58:03.962731844 +0200
@@ -311,8 +311,12 @@ if test x$nss_crypt = xyes; then
   if test $? -ne 0; then
     AC_MSG_ERROR([cannot find include directory with nss-config])
   fi
+  nspr_includes=-I$(nspr-config --includedir 2>/dev/null)
+  if test $? -ne 0; then
+    AC_MSG_ERROR([cannot find include directory with nspr-config])
+  fi
   old_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $nss_includes"
+  CFLAGS="$CFLAGS $nss_includes $nspr_includes"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([typedef int PRBool;
 #include <hasht.h>
 #include <nsslowhash.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]