aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rwxr-xr-xconfigure6
-rw-r--r--configure.ac6
-rw-r--r--crypt/Makefile8
-rwxr-xr-xscripts/check-local-headers.sh2
5 files changed, 27 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index da2728a..f782b14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-10-04 Guido Trentalancia <guido@trentalancia.net>
+
+ [BZ #17956]
+ * configure.ac (--enable-nss-crypt): Use NSPR include directory.
+ * configure: Regenerate.
+ * crypt/Makefile (nss-cpp-flags): New variable.
+ (CPPFLAGS-sha256-crypt.c, CPPFLAGS-sha512-crypt.c)
+ (CPPFLAGS-md5-crypt.c): Use it.
+ * scripts/check-local-headers.sh: Ignore nspr header file
+ directory.
+
2017-10-04 Andreas Schwab <schwab@suse.de>
* nis/Makefile (services): Remove compat.
diff --git a/configure b/configure
index 067d92d..a7c72ea 100755
--- a/configure
+++ b/configure
@@ -3549,8 +3549,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. */
diff --git a/configure.ac b/configure.ac
index d412104..4b83ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -330,8 +330,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>
diff --git a/crypt/Makefile b/crypt/Makefile
index 0280fba..8bbbf2a 100644
--- a/crypt/Makefile
+++ b/crypt/Makefile
@@ -37,9 +37,11 @@ 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)
+nss-cpp-flags := -DUSE_NSS \
+ -I$(shell nss-config --includedir) -I$(shell nspr-config --includedir)
+CPPFLAGS-sha256-crypt.c = $(nss-cpp-flags)
+CPPFLAGS-sha512-crypt.c = $(nss-cpp-flags)
+CPPFLAGS-md5-crypt.c = $(nss-cpp-flags)
LDLIBS-crypt.so = -lfreebl3
else
libcrypt-routines += md5 sha256 sha512
diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
index 7859f61..4692361 100755
--- a/scripts/check-local-headers.sh
+++ b/scripts/check-local-headers.sh
@@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir" '
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|nspr/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{