Bug 1251210 - In configure.py, take AUTOCONF from the environment, if set there. r=ted

At the same time, remove the (useless and wrong) check for AUTOCONF in
old-configure.in (wrong because it very likely is picking autoconf > 2.5).

--HG--
extra : rebase_source : 4a17c9d92c9561ef221b1a300e0e6d48ca56862f
This commit is contained in:
Mike Hommey 2016-02-26 02:08:29 +09:00
Родитель f82a78c907
Коммит b82e33004b
3 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -24,7 +24,15 @@ if sys.platform == 'win32':
shell = shell + '.exe'
def is_absolute_or_relative(path):
if os.altsep and os.altsep in path:
return True
return os.sep in path
def find_program(file):
if is_absolute_or_relative(file):
return os.path.abspath(file) if os.path.isfile(file) else None
try:
return which(file)
except WhichError:
@ -45,10 +53,12 @@ def autoconf_refresh(configure):
else:
return
for ac in ('autoconf-2.13', 'autoconf2.13', 'autoconf213'):
autoconf = find_program(ac)
if autoconf:
break
for ac in (os.environ.get('AUTOCONF'), 'autoconf-2.13', 'autoconf2.13',
'autoconf213'):
if ac:
autoconf = find_program(ac)
if autoconf:
break
else:
fink = find_program('fink')
if fink:
@ -58,6 +68,9 @@ def autoconf_refresh(configure):
if not autoconf:
raise RuntimeError('Could not find autoconf 2.13')
# Add or adjust AUTOCONF for subprocesses, especially the js/src configure
os.environ['AUTOCONF'] = autoconf
print('Refreshing %s' % configure, file=sys.stderr)
with open(configure, 'wb') as fh:

Просмотреть файл

@ -570,7 +570,6 @@ fi
AC_SUBST(NSINSTALL_BIN)
MOZ_PATH_PROG(DOXYGEN, doxygen, :)
MOZ_PATH_PROG(AUTOCONF, autoconf, :)
MOZ_PATH_PROG(XARGS, xargs)
if test -z "$XARGS" -o "$XARGS" = ":"; then
AC_MSG_ERROR([xargs not found in \$PATH .])

Просмотреть файл

@ -782,7 +782,6 @@ fi
AC_SUBST(NSINSTALL_BIN)
MOZ_PATH_PROG(DOXYGEN, doxygen, :)
MOZ_PATH_PROG(AUTOCONF, autoconf, :)
MOZ_PATH_PROGS(UNZIP, unzip)
if test -z "$UNZIP" -o "$UNZIP" = ":"; then
AC_MSG_ERROR([unzip not found in \$PATH])