nsprpub/config/autoconf.mk.in
author Jim Blandy <jimb@mozilla.org>
Wed, 29 Oct 2008 08:29:22 -0700
changeset 21062 8c52a9486c8f25a93063f5b628575837156f266b
parent 15272 4231ddd5f31aacd9345c972aff00b25e15fc6de7
child 26462 9560711165646da2bff775379e30997efbf7e1fd
permissions -rw-r--r--
Bug 97954: Allow SpiderMonkey to be built on its own, or as part of Mozilla. Give SpiderMonkey its own configure script and top-level Makefile. Adjust js/src/Makefile as appropriate for life as a stand-alone makefile, instead of a 'make export; make libs'-style Mozilla tier makefile. Have the configure script accept '--with-nspr-cflags' and '--with-nspr-libs' options for using an in-tree NSPR. Also accept '--with-system-nspr', '--with-nspr-prefix', and '--with-nspr-exec-prefix' flags for using an installed NSPR. Default to --disable-jemalloc, assuming we don't have that part of the tree available; have the top-level configure script pass --enable-jemalloc as needed. Since we no longer have an export phase to copy header files into dist/include/js before we build the library, we need to be able to find nanojit.h in the nanojit directory; fix references in jsbuiltins.h and jstracer.cpp. Give SpiderMonkey it its own copies of many of the files from ./config and ./build. These are all exact copies, except as follows: . js/src/config/Makefile.in: js/src only has a subset of js/src/config, and thus a subset of the makefile targets. . js/src/config/autoconf.mk.in: js/src/configure.in has its own make variables to set, not set by the top-level configure script, so it needs a custom automake.mk template. . js/src/config/make-system-wrappers.pl: a copy from nsprpub/config, so that we can build without having an NSPR source tree handy. Invoke js/src/configure from ./configure, passing the values computed for NSPR_CFLAGS and NSPR_LIBS by the top-level configure script. Treat js/src as a static directory of the js tier, and create a new config/js (just a Makefile) to be the js tier's non-static directory. Let js/src/configure generate SpiderMonkey's makefiles, not ./configure. Generate a 'js-config' script, which clients can call to find the CFLAGS and LIBS values necessary to compile and link against an installed SpiderMonkey library. Don't include the js-config script in Macintosh packages. Teach client.mk how to rebuild js/src/configure. Tell Mercurial to ignore files generated by autoconf in js/src. Further work: . Right now, callers must define JS_THREADSAFE when #including jsapi.h. This is fixed in a subsequent patch. . js/src/configure is a trimmed copy of ./configure. It could be trimmed more.

# -*- Mode: Makefile -*-

INCLUDED_AUTOCONF_MK = 1
USE_AUTOCONF	= 1
@SHELL_OVERRIDE@
MOZILLA_CLIENT	= @MOZILLA_CLIENT@

prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
includedir	= @includedir@
libdir		= @libdir@
datadir		= @datadir@

dist_prefix	= @dist_prefix@
dist_bindir	= @dist_bindir@
dist_includedir = @dist_includedir@
dist_libdir	= @dist_libdir@

DIST		= $(dist_prefix)

RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@
OBJDIR_NAME	= @OBJDIR_NAME@
OBJDIR		= @OBJDIR@
OBJ_SUFFIX	= @OBJ_SUFFIX@
LIB_SUFFIX	= @LIB_SUFFIX@
DLL_SUFFIX	= @DLL_SUFFIX@
ASM_SUFFIX	= @ASM_SUFFIX@
MOD_NAME	= @NSPR_MODNAME@

MOD_MAJOR_VERSION = @MOD_MAJOR_VERSION@
MOD_MINOR_VERSION = @MOD_MINOR_VERSION@
MOD_PATCH_VERSION = @MOD_PATCH_VERSION@

LIBNSPR		= @LIBNSPR@
LIBPLC		= @LIBPLC@

CROSS_COMPILE	= @CROSS_COMPILE@
BUILD_OPT	= @MOZ_OPTIMIZE@

USE_CPLUS	= @USE_CPLUS@
USE_IPV6	= @USE_IPV6@
USE_N32		= @USE_N32@
USE_64		= @USE_64@
GC_LEAK_DETECTOR = @GC_LEAK_DETECTOR@
ENABLE_STRIP	= @ENABLE_STRIP@

USE_PTHREADS	= @USE_PTHREADS@
USE_BTHREADS	= @USE_BTHREADS@
PTHREADS_USER	= @USE_USER_PTHREADS@
CLASSIC_NSPR	= @USE_NSPR_THREADS@

AS		= @AS@
ASFLAGS		= @ASFLAGS@
CC		= @CC@
CCC		= @CXX@
NS_USE_GCC	= @GNU_CC@
GCC_USE_GNU_LD	= @GCC_USE_GNU_LD@
MSC_VER		= @MSC_VER@
AR		= @AR@
AR_FLAGS	= @AR_FLAGS@
LD		= @LD@
RANLIB		= @RANLIB@
PERL		= @PERL@
RC		= @RC@
RCFLAGS		= @RCFLAGS@
STRIP		= @STRIP@
NSINSTALL	= @NSINSTALL@
FILTER		= @FILTER@
IMPLIB		= @IMPLIB@
CYGWIN_WRAPPER	= @CYGWIN_WRAPPER@
MT		= @MT@

OS_CPPFLAGS	= @CPPFLAGS@
OS_CFLAGS	= $(OS_CPPFLAGS) @CFLAGS@ $(DSO_CFLAGS)
OS_CXXFLAGS	= $(OS_CPPFLAGS) @CXXFLAGS@ $(DSO_CFLAGS)
OS_LIBS         = @OS_LIBS@
OS_LDFLAGS	= @LDFLAGS@
OS_DLLFLAGS	= @OS_DLLFLAGS@
DLLFLAGS	= @DLLFLAGS@
EXEFLAGS  = @EXEFLAGS@
OPTIMIZER	= @OPTIMIZER@

MKSHLIB		= @MKSHLIB@
DSO_CFLAGS	= @DSO_CFLAGS@
DSO_LDOPTS	= @DSO_LDOPTS@

RESOLVE_LINK_SYMBOLS = @RESOLVE_LINK_SYMBOLS@

HOST_CC		= @HOST_CC@
HOST_CFLAGS	= @HOST_CFLAGS@
HOST_LDFLAGS	= @HOST_LDFLAGS@

DEFINES		= @DEFINES@ @DEFS@

MDCPUCFG_H	= @MDCPUCFG_H@
PR_MD_CSRCS	= @PR_MD_CSRCS@
PR_MD_ASFILES	= @PR_MD_ASFILES@
PR_MD_ARCH_DIR	= @PR_MD_ARCH_DIR@
CPU_ARCH	= @CPU_ARCH@

OS_TARGET	= @OS_TARGET@
OS_ARCH		= @OS_ARCH@
OS_RELEASE	= @OS_RELEASE@
OS_TEST		= @OS_TEST@

NOSUCHFILE	= @NOSUCHFILE@
AIX_LINK_OPTS	= @AIX_LINK_OPTS@
MOZ_OBJFORMAT	= @MOZ_OBJFORMAT@
ULTRASPARC_LIBRARY = @ULTRASPARC_LIBRARY@

OBJECT_MODE	= @OBJECT_MODE@
ifdef OBJECT_MODE
export OBJECT_MODE
endif

VISIBILITY_FLAGS = @VISIBILITY_FLAGS@
WRAP_SYSTEM_INCLUDES = @WRAP_SYSTEM_INCLUDES@

MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
ifdef MACOSX_DEPLOYMENT_TARGET
export MACOSX_DEPLOYMENT_TARGET
endif

MACOS_SDK_DIR	= @MACOS_SDK_DIR@

NEXT_ROOT	= @NEXT_ROOT@
ifdef NEXT_ROOT
export NEXT_ROOT
endif