Make sure CPPFLAGS are setup correctly for finding nspr.h

If we have pkgconfig make sure CPPFLAGS are setup correctly for the nss
-I include path. Otherwise the checks to find nspr.h will fail.
This commit is contained in:
Mark Wielaard 2016-03-18 16:54:39 +01:00 committed by Florian Festi
parent 18bf1aa6d9
commit 64b6cbbb44
1 changed files with 7 additions and 0 deletions

View File

@ -281,6 +281,13 @@ AC_SUBST(WITH_BEECRYPT_INCLUDE)
WITH_NSS_INCLUDE=
WITH_NSS_LIB=
if test "$with_beecrypt" != yes ; then
# If we have pkgconfig make sure CPPFLAGS are setup correctly for the nss
# -I include path. Otherwise the below checks will fail because nspr.h
# cannot be found.
AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no], [$PATH:/usr/bin:/usr/local/bin])
if test "x$PKGCONFIG" != "xno"; then
CPPFLAGS="$CPPFLAGS $($PKGCONFIG --cflags nss)"
fi
AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [
AC_MSG_ERROR([missing required NSPR / NSS header])
])