Merge initial patches for bug 97954: autoconf build environment for spidermonkey

This commit is contained in:
Brian Crowder 2008-08-27 10:16:56 -07:00
commit 4670191ed2
5 changed files with 20 additions and 24 deletions

7
aclocal.m4 vendored
View File

@ -13,7 +13,10 @@ builtin(include, build/autoconf/libart.m4)dnl
builtin(include, build/autoconf/pkg.m4)dnl
builtin(include, build/autoconf/freetype2.m4)dnl
builtin(include, build/autoconf/codeset.m4)dnl
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl
# Read the user's .mozconfig script. We can't do this in
# configure.in: autoconf puts the argument parsing code above anything
# expanded from configure.in, and we need to get the configure options
# from .mozconfig in place before that argument parsing code.
MOZ_READ_MOZCONFIG(.)

View File

@ -152,6 +152,3 @@ AC_DEFUN([MOZ_READ_MOZCONFIG],
# See the mozconfig2configure script for more details.
_AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
dnl This gets inserted at the top of the configure script
MOZ_READ_MOZCONFIG(MOZ_TOPSRCDIR)

View File

@ -162,6 +162,7 @@ endif
endif # MOZ_BUILD_PROJECTS
# 'configure' scripts generated by autoconf.
CONFIGURES := $(TOPSRCDIR)/configure
CONFIGURES += $(TOPSRCDIR)/nsprpub/configure
@ -274,20 +275,15 @@ EXTRA_CONFIG_DEPS := \
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
$(NULL)
$(TOPSRCDIR)/configure: $(TOPSRCDIR)/configure.in $(EXTRA_CONFIG_DEPS)
$(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
@echo Generating $@ using autoconf
cd $(TOPSRCDIR); $(AUTOCONF)
$(TOPSRCDIR)/nsprpub/configure: $(TOPSRCDIR)/nsprpub/configure.in $(EXTRA_CONFIG_DEPS)
@echo Generating $@ using autoconf
cd $(TOPSRCDIR)/nsprpub; $(AUTOCONF)
cd $(@D); $(AUTOCONF)
endif
CONFIG_STATUS_DEPS := \
$(TOPSRCDIR)/configure \
$(wildcard $(CONFIGURES)) \
$(TOPSRCDIR)/allmakefiles.sh \
$(TOPSRCDIR)/.mozconfig.mk \
$(wildcard $(TOPSRCDIR)/nsprpub/configure) \
$(wildcard $(TOPSRCDIR)/directory/c-sdk/configure) \
$(wildcard $(TOPSRCDIR)/config/milestone.txt) \
$(wildcard $(TOPSRCDIR)/config/chrome-versions.sh) \
@ -307,7 +303,9 @@ ifdef MOZ_TOOLS
CONFIGURE = $(TOPSRCDIR)/configure
endif
configure:: $(CONFIGURES)
configure-files: $(CONFIGURES)
configure:: configure-files
ifdef MOZ_BUILD_PROJECTS
@if test ! -d $(MOZ_OBJDIR); then $(MKDIR) $(MOZ_OBJDIR); else true; fi
endif

View File

@ -1133,7 +1133,7 @@ ifdef IS_COMPONENT
cp $(VMS_SYMVEC_FILE_COMP) $(VMS_SYMVEC_FILE); \
fi
endif
endif
endif # OpenVMS
ifdef NO_LD_ARCHIVE_FLAGS
ifdef SHARED_LIBRARY_LIBS
@rm -f $(SUB_SHLOBJS)
@ -1171,7 +1171,7 @@ endif
done
@rm -f $(MOZILLA_PROBE_LIBS)
else
else # ! DTRACE_LIB_DEPENDENT
$(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(DTRACE_PROBE_OBJ) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
endif # DTRACE_LIB_DEPENDENT

View File

@ -375,11 +375,9 @@ EXTRA_DSO_LDOPTS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
LIBS += C:/Program\ Files/Intel/VTune/Analyzer/Lib/VtuneApi.lib
endif
LDFLAGS += $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS))
# BeOS and HP-UX do not require the extra linking of "-lm"
ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH)))
LDFLAGS += -lm
EXTRA_LIBS += -lm
endif
# Prevent floating point errors caused by VC++ optimizations
@ -392,7 +390,7 @@ endif
endif # WINNT
ifeq ($(OS_ARCH),FreeBSD)
LDFLAGS += -pthread
EXTRA_LIBS += -pthread
endif
ifeq ($(OS_ARCH),IRIX)
ifdef USE_N32
@ -400,10 +398,10 @@ DASH_R += -n32
endif
endif
ifeq ($(OS_ARCH),Linux)
LDFLAGS += -ldl
EXTRA_LIBS += -ldl
endif
ifeq ($(OS_ARCH),OSF1)
LDFLAGS += -lc_r
EXTRA_LIBS += -lc_r
endif
ifeq ($(OS_ARCH),SunOS)
ifeq ($(TARGET_CPU),sparc)
@ -420,9 +418,9 @@ endif # JS_ULTRASPARC_OPTS
endif
ifeq ($(OS_RELEASE),4.1)
LDFLAGS += -ldl -lnsl
EXTRA_LIBS += -ldl -lnsl
else
LDFLAGS += -lposix4 -ldl -lnsl -lsocket
EXTRA_LIBS += -lposix4 -ldl -lnsl -lsocket
endif
endif