Kaydet (Commit) c1f5475b authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Do try to use ccache even if CC/CXX are set

For Android, they could have been set earlier in the configure script
even. We do want to use ccache also for Android cross-compilation.
üst 48649cdf
...@@ -2032,37 +2032,34 @@ dnl =================================================================== ...@@ -2032,37 +2032,34 @@ dnl ===================================================================
dnl Checks if ccache is available dnl Checks if ccache is available
dnl =================================================================== dnl ===================================================================
if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \) ; then if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \) ; then
if test -z "$CC" ; then case "%$CC%$CXX%" in
if test -z "$CXX" ; then # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
AC_PATH_PROG([CCACHE],[ccache],[not found]) # assume that's good then
if test "$CCACHE" = "not found" ; then ccache[[-_' ']]*|*/ccache[[-_' ']]*)
CCACHE="" AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
else ;;
CCACHE="ccache" *)
# need to check for ccache version: otherwise prevents AC_PATH_PROG([CCACHE],[ccache],[not found])
# caching of the results (like "-x objective-c++" for Mac) if test "$CCACHE" = "not found" ; then
if test $_os = Darwin -o $_os = iOS; then CCACHE=""
# check ccache version else
AC_MSG_CHECKING([whether version of ccache is suitable]) # Need to check for ccache version: otherwise prevents
CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` # caching of the results (like "-x objective-c++" for Mac)
CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test $_os = Darwin -o $_os = iOS; then
if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then # Check ccache version
AC_MSG_RESULT([yes]) AC_MSG_CHECKING([whether version of ccache is suitable])
else CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
AC_MSG_RESULT([no]) CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.]) if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
CCACHE="" AC_MSG_RESULT([yes, $CCACHE_VERSION])
fi else
AC_MSG_RESULT([no, $CCACHE_VERSION])
CCACHE=""
fi fi
fi fi
else
AC_MSG_NOTICE([Automatic ccache detection ignored: CXX is pre-defined])
CCACHE=""
fi fi
else ;;
AC_MSG_NOTICE([Automatic ccache detection ignored: CC is pre-defined]) esac
CCACHE=""
fi
else else
CCACHE="" CCACHE=""
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment