Bug 1264129 - Use sed to update configure from configure.in, instead of autoconf. r?gps
The configure.in is a small wrapper around python configure, that is
still a m4 script so that people running autoconf manually can still
do so without breaking their stuff (and we have jobs that do that
on automation as well).
But considering how simple the m4 is, to avoid having the autoconf
checking code twice (once in client.mk and once in
build/moz.configure/old.configure), we can just process it with sed
instead of autoconf.
--- a/client.mk
+++ b/client.mk
@@ -60,29 +60,16 @@ endif
ifndef TOPSRCDIR
ifeq (,$(wildcard client.mk))
TOPSRCDIR := $(patsubst %/,%,$(dir $(MAKEFILE_LIST)))
else
TOPSRCDIR := $(CWD)
endif
endif
-# try to find autoconf 2.13 - discard errors from 'which'
-# MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
-AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
-
-# See if the autoconf package was installed through fink
-ifeq (,$(strip $(AUTOCONF)))
-AUTOCONF = $(shell which fink >/dev/null 2>&1 && echo `which fink`/../../lib/autoconf2.13/bin/autoconf)
-endif
-
-ifeq (,$(strip $(AUTOCONF)))
-AUTOCONF=$(error Could not find autoconf 2.13)
-endif
-
SH := /bin/sh
PERL ?= perl
PYTHON ?= $(shell which python2.7 > /dev/null 2>&1 && echo python2.7 || echo python)
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
ifdef CONFIG_GUESS_SCRIPT
CONFIG_GUESS := $(shell $(CONFIG_GUESS_SCRIPT))
endif
@@ -314,18 +301,18 @@ EXTRA_CONFIG_DEPS := \
$(TOPSRCDIR)/aclocal.m4 \
$(TOPSRCDIR)/old-configure.in \
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
$(TOPSRCDIR)/js/src/aclocal.m4 \
$(TOPSRCDIR)/js/src/old-configure.in \
$(NULL)
$(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
- @echo Generating $@ using autoconf
- cd $(@D); $(AUTOCONF)
+ @echo Generating $@
+ sed '1,/^divert/d' $< > $@
CONFIG_STATUS_DEPS := \
$(wildcard $(TOPSRCDIR)/*/confvars.sh) \
$(CONFIGURES) \
$(TOPSRCDIR)/CLOBBER \
$(TOPSRCDIR)/nsprpub/configure \
$(TOPSRCDIR)/config/milestone.txt \
$(TOPSRCDIR)/browser/config/version.txt \