build/autoconf/wrapper.m4

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:2cef5277a3ef
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/.
4
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")
14
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
31
32 AC_SUBST(MOZ_USING_COMPILER_WRAPPER)
33 ])

mercurial