build/autoconf/hooks.m4

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial