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],
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
18 dnl When giving a windows path with backslashes, js/src/configure
19 dnl fails because of double wrapping because the test further below
20 dnl doesn't work with backslashes. While fixing that test to work
21 dnl might seem better, a lot of the make build backend actually
22 dnl doesn't like backslashes, so normalize windows paths to use
24 COMPILER_WRAPPER=`echo "$COMPILER_WRAPPER" | tr '\\' '/'`
33 CC="$COMPILER_WRAPPER $CC"
34 CXX="$COMPILER_WRAPPER $CXX"
39 MOZ_USING_COMPILER_WRAPPER=1
44 AC_SUBST(MOZ_USING_COMPILER_WRAPPER)