bug 1243349 - fix NSPR link paths for NSS. r=mshal

This commit is contained in:
Ted Mielczarek 2016-01-27 09:28:40 -05:00
parent 7aa6ba1add
commit 675026d895
3 changed files with 26 additions and 13 deletions

View File

@ -157,15 +157,25 @@ if test -n "$MOZ_NATIVE_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
AC_MSG_ERROR([system NSPR does not support PR_UINT64 or including prtypes.h does not provide it]))
CFLAGS=$_SAVE_CFLAGS
elif test -z "$JS_POSIX_NSPR"; then
NSPR_CFLAGS="-I${DIST}/include/nspr"
NSPR_INCLUDE_DIR="${DIST}/include/nspr"
NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}"
if test -n "$GNU_CC"; then
NSPR_LIBS="-L${DIST}/lib -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
if test -n "$MOZ_FOLD_LIBS"; then
NSPR_LIB_DIR=${DIST}/lib
else
NSPR_LIB_DIR=${DIST}/bin
fi
NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
else
# NSS needs actual static libs to link to, and this is where they are.
NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib "
NSPR_LIB_DIR="${DIST}/lib"
fi
fi
AC_SUBST_LIST(NSPR_CFLAGS)
AC_SUBST(NSPR_INCLUDE_DIR)
AC_SUBST(NSPR_LIB_DIR)
NSPR_PKGCONF_CHECK="nspr"
if test -n "$MOZ_NATIVE_NSPR"; then

View File

@ -87,17 +87,20 @@ endif
# For all variables such as DLLFLAGS, that may contain $(DIST)
DIST := $(ABS_DIST)
# TODO: move this all to configure, but in Python
ifndef MOZ_BUILD_NSPR
NSPR_INCLUDE_DIR = $(firstword $(filter -I%,$(NSPR_CFLAGS)))
ifneq (,$(strip $(NSPR_INCLUDE_DIR)))
NSPR_INCLUDE_DIR := $(subst -I,,$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_INCLUDE_DIR)))
else
NSPR_INCLUDE_DIR = $(ABS_DIST)/include/nspr
$(error Your NSPR CFLAGS are broken!)
endif
NSPR_LIB_DIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
ifneq (,$(strip $(NSPR_LIB_DIR)))
NSPR_LIB_DIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIB_DIR)))
else
NSPR_LIB_DIR = $(ABS_DIST)/lib
$(error Your NSPR LDFLAGS are broken!)
endif
endif
# To get debug symbols from NSS

View File

@ -3408,6 +3408,15 @@ MOZ_ARG_WITH_STRING(libxul-sdk,
[ --with-libxul-sdk=PFX Use the libXUL SDK at <PFX>],
AC_MSG_ERROR([--with-libxul-sdk is not supported anymore.]))
case "$OS_TARGET" in
WINNT|Darwin|Android)
MOZ_FOLD_LIBS=1
;;
*)
MOZ_FOLD_LIBS=
;;
esac
MOZ_CONFIG_NSPR()
dnl set GRE_MILESTONE
@ -4096,15 +4105,6 @@ AC_SUBST(MOZ_B2GDROID)
AC_DEFINE_UNQUOTED(MOZ_BUILD_APP,$MOZ_BUILD_APP)
case "$OS_TARGET" in
WINNT|Darwin|Android)
MOZ_FOLD_LIBS=1
;;
*)
MOZ_FOLD_LIBS=
;;
esac
dnl ========================================================
dnl Ensure Android SDK and build-tools versions depending on
dnl mobile target.