build/autoconf/wrapper.m4

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/autoconf/wrapper.m4	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +dnl This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +dnl License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 +dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +dnl =======================================================================
     1.9 +dnl = Enable compiling with various compiler wrappers (distcc, ccache, etc)
    1.10 +dnl =======================================================================
    1.11 +AC_DEFUN([MOZ_CHECK_COMPILER_WRAPPER],
    1.12 +[
    1.13 +MOZ_ARG_WITH_STRING(compiler_wrapper,
    1.14 +[  --with-compiler-wrapper[=path/to/wrapper]
    1.15 +    Enable compiling with wrappers such as distcc and ccache],
    1.16 +    COMPILER_WRAPPER=$withval, COMPILER_WRAPPER="no")
    1.17 +
    1.18 +if test "$COMPILER_WRAPPER" != "no"; then
    1.19 +    case "$CC" in
    1.20 +    $COMPILER_WRAPPER\ *)
    1.21 +        :
    1.22 +        ;;
    1.23 +    *)
    1.24 +        CC="$COMPILER_WRAPPER $CC"
    1.25 +        CXX="$COMPILER_WRAPPER $CXX"
    1.26 +        _SUBDIR_CC="$CC"
    1.27 +        _SUBDIR_CXX="$CXX"
    1.28 +        ac_cv_prog_CC="$CC"
    1.29 +        ac_cv_prog_CXX="$CXX"
    1.30 +        MOZ_USING_COMPILER_WRAPPER=1
    1.31 +        ;;
    1.32 +    esac
    1.33 +fi
    1.34 +
    1.35 +AC_SUBST(MOZ_USING_COMPILER_WRAPPER)
    1.36 +])

mercurial