@@ -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. */
@@ -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>
@@ -37,9 +37,9 @@ routines += $(libcrypt-routines)
endif
ifeq ($(nss-crypt),yes)
-CPPFLAGS-sha256-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
-CPPFLAGS-sha512-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
-CPPFLAGS-md5-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+CPPFLAGS-sha256-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir) -I$(shell nspr-config --includedir)
+CPPFLAGS-sha512-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir) -I$(shell nspr-config --includedir)
+CPPFLAGS-md5-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir) -I$(shell nspr-config --includedir)
LDLIBS-crypt.so = -lfreebl3
else
libcrypt-routines += md5 sha256 sha512
When configuring and building GNU libc 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. 2016-05-31 Guido Trentalancia <guido@trentalancia.net> [BZ #17956] * configure: If the Mozilla NSS library is used for cryptography (--enable-nss-crypt option), also include the Mozilla NSPR header files when building the test program. Fail if Mozilla NSPR cannot be found. * configure.ac: Likewise. * crypt/Makefile: Include the Mozilla NSPR header files when the Mozilla NSS library is used for cryptography (--enable-nss-crypt configure option). Signed-off-by: Guido Trentalancia <guido@trentalancia.net> --- configure | 6 +++++- configure.ac | 6 +++++- crypt/Makefile | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-)