build/autoconf/wrapper.m4

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 =======================================================================
     6 dnl = Enable compiling with various compiler wrappers (distcc, ccache, etc)
     7 dnl =======================================================================
     8 AC_DEFUN([MOZ_CHECK_COMPILER_WRAPPER],
     9 [
    10 MOZ_ARG_WITH_STRING(compiler_wrapper,
    11 [  --with-compiler-wrapper[=path/to/wrapper]
    12     Enable compiling with wrappers such as distcc and ccache],
    13     COMPILER_WRAPPER=$withval, COMPILER_WRAPPER="no")
    15 if test "$COMPILER_WRAPPER" != "no"; then
    16     case "$CC" in
    17     $COMPILER_WRAPPER\ *)
    18         :
    19         ;;
    20     *)
    21         CC="$COMPILER_WRAPPER $CC"
    22         CXX="$COMPILER_WRAPPER $CXX"
    23         _SUBDIR_CC="$CC"
    24         _SUBDIR_CXX="$CXX"
    25         ac_cv_prog_CC="$CC"
    26         ac_cv_prog_CXX="$CXX"
    27         MOZ_USING_COMPILER_WRAPPER=1
    28         ;;
    29     esac
    30 fi
    32 AC_SUBST(MOZ_USING_COMPILER_WRAPPER)
    33 ])

mercurial