This patch depends on compute-libxul-dist-in-configure.patch. The
comments there explain why we need 'fully-substituted values'.
The computation of NSPR_CFLAGS and NSPR_LIBS in the top-level
configure.in is non-trivial. To avoid duplicating all that in the
SpiderMonkey configure script, we'd like to just pass the values we've
computed down to that script as arguments. So:
. The values should contain complete filenames, and ought not contain
references to makefile variables only meaningful to the main build
machinery. In particular, they shouldn't be recursively expanded
variables that refer to LIBXUL_DIST.
. We should set NSPR_LIBS and NSPR_CFLAGS, not the temporaries _libs
and _cflags, because these values are what we want to pass down to
SpiderMonkey. A later patch in the series uses these values.
Background:
Thread-safe SpiderMonkey needs NSPR for threading support, so it uses
the values of NSPR_CFLAGS and NSPR_LIBS to compile and link. The
configure script puts values for those variables in
$(DEPTH)/config/autoconf.mk. They're recursively expanded Make
variables, and the configure script gives them values that cite the
value of LIBXUL_DIST.
LIBXUL_DIST is itself a recursively expanded variable which usually
refers to $(DIST), but refers to $(LIBXUL_SDK) if we're building
against a separate XUL tree.
Once SpiderMonkey has its own configure script, that script should
take options specifying values to use for NSPR_CFLAGS and NSPR_LIBS.
The values we pass to it shouldn't try to reference $(LIBXUL_DIST) or
any other variable from the surrounding makefiles: a stand-alone
Spidermonkey's configuration and build system shouldn't mention LIBXUL
at all. SpiderMonkey doesn't depend on LIBXUL, only NSPR, which just
happens to be installed in the same dist directory as LIBXUL.
That means we need to compute fully-substituted values for NSPR_CFLAGS
and NSPR_LIBS, suitable for stand-alone use in the top-level configure
script, which we can pass down to the SpiderMonkey configure script
(once it has one).
The first step is to actually compute an independent value for
LIBXUL_DIST, one that doesn't refer to either $(DIST) or
$(LIBXUL_SDK). This means we need to make that choice in the
configuration script, not in autoconf.mk. Subsequent patches will use
this to compute fully-substituted values for NSPR_LIBS and NSPR_CFLAGS.
We'd like the SpiderMonkey configure script to generate a header file
named js-config.h to hold #definitions chosen at configure time that
affect the SpiderMonkey API, like JS_THREADSAFE. However, that name
is very similar to that of an existing header file, jsconfig.h. This
patch renames the existing header file, and updates all references to
it.
--HG--
rename : js/src/jsconfig.h => js/src/jsversion.h
This changeset removes a bunch of code that was labeled REMOVE ME with a release
stated. All those releases have passed, so let's get rid of the code.
r=dietrich