Bug 620788 - Do not silently fall back to bundled NSS/NSPR if system ones can't be used. r=khuey a=bsmedberg
authorMounir Lamouri <mounir.lamouri@gmail.com>
Thu, 03 Feb 2011 00:13:07 +0100
changeset 61814 10c5b6239ce3366157cdc689c33b9af02a9a74c4
parent 61813 6f2a03f7876d05e99f485c34caeca1e0e8c7620f
child 61815 2772a0cf36d1d5231c1babab93cad542bf2d0783
push id18504
push usermlamouri@mozilla.com
push dateWed, 02 Feb 2011 23:23:00 +0000
treeherdermozilla-central@8a376e2a5400 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, bsmedberg
bugs620788
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 620788 - Do not silently fall back to bundled NSS/NSPR if system ones can't be used. r=khuey a=bsmedberg
build/autoconf/nspr.m4
build/autoconf/nss.m4
configure.in
js/src/build/autoconf/nspr.m4
js/src/configure.in
--- a/build/autoconf/nspr.m4
+++ b/build/autoconf/nspr.m4
@@ -87,15 +87,16 @@ AC_ARG_WITH(nspr-exec-prefix,
 		fi
 	fi
 
 	if test -z "$no_nspr"; then
 		AC_MSG_RESULT(yes)
 		ifelse([$2], , :, [$2])     
 	else
 		AC_MSG_RESULT(no)
+		ifelse([$3], , :, [$3])
 	fi
 
 
 	AC_SUBST(NSPR_CFLAGS)
 	AC_SUBST(NSPR_LIBS)
 
 ])
--- a/build/autoconf/nss.m4
+++ b/build/autoconf/nss.m4
@@ -68,15 +68,16 @@ AC_ARG_WITH(nss-exec-prefix,
 		fi
 	fi
 
 	if test -z "$no_nss"; then
 		AC_MSG_RESULT(yes)
 		ifelse([$2], , :, [$2])     
 	else
 		AC_MSG_RESULT(no)
+		ifelse([$3], , :, [$3])
 	fi
 
 
 	AC_SUBST(NSS_CFLAGS)
 	AC_SUBST(NSS_LIBS)
 
 ])
--- a/configure.in
+++ b/configure.in
@@ -4612,17 +4612,17 @@ dnl ====================================
 dnl = If NSPR was not detected in the system, 
 dnl = use the one in the source tree (mozilla/nsprpub)
 dnl ========================================================
 MOZ_ARG_WITH_BOOL(system-nspr,
 [  --with-system-nspr      Use system installed NSPR],
     _USE_SYSTEM_NSPR=1 )
 
 if test -n "$_USE_SYSTEM_NSPR"; then
-    AM_PATH_NSPR(4.8.7, [MOZ_NATIVE_NSPR=1], [MOZ_NATIVE_NSPR=])
+    AM_PATH_NSPR(4.8.7, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
 fi
 
 if test -n "$MOZ_NATIVE_NSPR"; then
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $NSPR_CFLAGS"
     AC_TRY_COMPILE([#include "prtypes.h"],
                 [#ifndef PR_STATIC_ASSERT
                  #error PR_STATIC_ASSERT not defined or requires including prlog.h
@@ -4689,17 +4689,17 @@ dnl = If NSS was not detected in the sys
 dnl = use the one in the source tree (mozilla/security/nss)
 dnl ========================================================
 
 MOZ_ARG_WITH_BOOL(system-nss,
 [  --with-system-nss       Use system installed NSS],
     _USE_SYSTEM_NSS=1 )
 
 if test -n "$_USE_SYSTEM_NSS"; then
-    AM_PATH_NSS(3.12.9, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
+    AM_PATH_NSS(3.12.9, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
 fi
 
 if test -n "$MOZ_NATIVE_NSS"; then
    NSS_LIBS="$NSS_LIBS -lcrmf"
 else
    NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss'
    NSS_DEP_LIBS="\
         \$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)crmf.\$(LIB_SUFFIX) \
--- a/js/src/build/autoconf/nspr.m4
+++ b/js/src/build/autoconf/nspr.m4
@@ -87,15 +87,16 @@ AC_ARG_WITH(nspr-exec-prefix,
 		fi
 	fi
 
 	if test -z "$no_nspr"; then
 		AC_MSG_RESULT(yes)
 		ifelse([$2], , :, [$2])     
 	else
 		AC_MSG_RESULT(no)
+		ifelse([$3], , :, [$3])
 	fi
 
 
 	AC_SUBST(NSPR_CFLAGS)
 	AC_SUBST(NSPR_LIBS)
 
 ])
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -4559,22 +4559,17 @@ dnl --with-nspr-libs), but not both.
 if test "$_USE_SYSTEM_NSPR" && (test "$NSPR_CFLAGS" -o "$NSPR_LIBS"); then
     AC_MSG_ERROR([--with-system-nspr and --with-nspr-libs/cflags are mutually exclusive.
 See 'configure --help'.])
 fi
 
 dnl Top-level Mozilla switched to requiring NSPR 4.8.6 (bug 560582), but we don't need it in JS.
 if test -n "$_USE_SYSTEM_NSPR"; then
     MOZ_NATIVE_NSPR=
-    AM_PATH_NSPR(4.7.0, [MOZ_NATIVE_NSPR=1])
-    if test -z "$MOZ_NATIVE_NSPR"; then
-        AC_MSG_ERROR([--with-system-nspr given, but configure could not find a suitable NSPR.
-Pass --with-nspr-exec-prefix, --with-nspr-prefix, or --with-nspr-cflags/libs.
-See 'configure --help'.])
-    fi
+    AM_PATH_NSPR(4.7.0, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
 fi
 
 if test -n "$MOZ_NATIVE_NSPR"; then
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $NSPR_CFLAGS"
     AC_TRY_COMPILE([#include "prlog.h"],
                 [#ifndef PR_STATIC_ASSERT
                  #error PR_STATIC_ASSERT not defined