michael@0: dnl This Source Code Form is subject to the terms of the Mozilla Public michael@0: dnl License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: dnl ======================================================================= michael@0: dnl = Enable compiling with various compiler wrappers (distcc, ccache, etc) michael@0: dnl ======================================================================= michael@0: AC_DEFUN([MOZ_CHECK_COMPILER_WRAPPER], michael@0: [ michael@0: MOZ_ARG_WITH_STRING(compiler_wrapper, michael@0: [ --with-compiler-wrapper[=path/to/wrapper] michael@0: Enable compiling with wrappers such as distcc and ccache], michael@0: COMPILER_WRAPPER=$withval, COMPILER_WRAPPER="no") michael@0: michael@0: if test "$COMPILER_WRAPPER" != "no"; then michael@0: case "$CC" in michael@0: $COMPILER_WRAPPER\ *) michael@0: : michael@0: ;; michael@0: *) michael@0: CC="$COMPILER_WRAPPER $CC" michael@0: CXX="$COMPILER_WRAPPER $CXX" michael@0: _SUBDIR_CC="$CC" michael@0: _SUBDIR_CXX="$CXX" michael@0: ac_cv_prog_CC="$CC" michael@0: ac_cv_prog_CXX="$CXX" michael@0: MOZ_USING_COMPILER_WRAPPER=1 michael@0: ;; michael@0: esac michael@0: fi michael@0: michael@0: AC_SUBST(MOZ_USING_COMPILER_WRAPPER) michael@0: ])