Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | dnl This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | dnl License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | dnl Output the contents of config.log when configure exits with an |
michael@0 | 6 | dnl error code. |
michael@0 | 7 | define([MOZ_CONFIG_LOG_TRAP], |
michael@0 | 8 | [changequote(<<<, >>>)dnl |
michael@0 | 9 | trap '[ "$?" != 0 ] && echo "------ config.log ------" && tail -n 25 config.log' EXIT |
michael@0 | 10 | changequote([, ])dnl |
michael@0 | 11 | ]) |
michael@0 | 12 | |
michael@0 | 13 | dnl Wrap AC_INIT_PREPARE to add the above trap. |
michael@0 | 14 | define([_MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE])) |
michael@0 | 15 | define([AC_INIT_PREPARE], |
michael@0 | 16 | [_MOZ_AC_INIT_PREPARE($1) |
michael@0 | 17 | MOZ_CONFIG_LOG_TRAP |
michael@0 | 18 | ]) |
michael@0 | 19 | |
michael@0 | 20 | dnl Disable the trap when running sub-configures. |
michael@0 | 21 | define([_MOZ_AC_OUTPUT_SUBDIRS], defn([AC_OUTPUT_SUBDIRS])) |
michael@0 | 22 | define([MOZ_SUBCONFIGURE_WRAP], |
michael@0 | 23 | [ _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
michael@0 | 24 | case "$host" in |
michael@0 | 25 | *-mingw*) |
michael@0 | 26 | _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL) |
michael@0 | 27 | if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then |
michael@0 | 28 | _CONFIG_SHELL="${_CONFIG_SHELL}.exe" |
michael@0 | 29 | fi |
michael@0 | 30 | ;; |
michael@0 | 31 | esac |
michael@0 | 32 | |
michael@0 | 33 | if test -d "$1"; then |
michael@0 | 34 | (cd "$1"; $PYTHON $_topsrcdir/build/subconfigure.py dump "$_CONFIG_SHELL") |
michael@0 | 35 | else |
michael@0 | 36 | mkdir -p "$1" |
michael@0 | 37 | fi |
michael@0 | 38 | $2 |
michael@0 | 39 | (cd "$1"; $PYTHON $_topsrcdir/build/subconfigure.py adjust $ac_sub_configure) |
michael@0 | 40 | ]) |
michael@0 | 41 | |
michael@0 | 42 | define([AC_OUTPUT_SUBDIRS], |
michael@0 | 43 | [trap '' EXIT |
michael@0 | 44 | for moz_config_dir in $1; do |
michael@0 | 45 | MOZ_SUBCONFIGURE_WRAP([$moz_config_dir],[ |
michael@0 | 46 | _MOZ_AC_OUTPUT_SUBDIRS($moz_config_dir) |
michael@0 | 47 | ]) |
michael@0 | 48 | done |
michael@0 | 49 | |
michael@0 | 50 | MOZ_CONFIG_LOG_TRAP |
michael@0 | 51 | ]) |
michael@0 | 52 | |
michael@0 | 53 | dnl Print error messages in config.log as well as stderr |
michael@0 | 54 | define([AC_MSG_ERROR], |
michael@0 | 55 | [{ echo "configure: error: $1" 1>&2; echo "configure: error: $1" 1>&5; exit 1; }]) |