# HG changeset patch # User John W. Eaton # Date 1539196783 14400 # Node ID 990b5e6b1970c10c55bdd3a690859b86052776d1 # Parent 2ee6a02e6f2876f521acacef6f1a035928caa882 use AC_PATH_PROG to check for ccache; use result in ccache-links Makefile rule diff -r 2ee6a02e6f28 -r 990b5e6b1970 Makefile.in --- a/Makefile.in Wed Oct 10 14:31:19 2018 -0400 +++ b/Makefile.in Wed Oct 10 14:39:43 2018 -0400 @@ -30,6 +30,7 @@ # Set to "yes" to use ccache USE_CCACHE := @USE_CCACHE@ +CCACHE := @CCACHE@ # Set to "yes" to use the versions of GCC and binutils already # installed on your system (default is yes if doing native build). @@ -622,12 +623,12 @@ @mkdir -p usr/bin/ccache && \ for f in gcc g++ gfortran; do \ if test ! -e usr/bin/ccache/$(MXE_TOOL_PREFIX)$$f; then \ - ln -s /usr/bin/ccache usr/bin/ccache/$(MXE_TOOL_PREFIX)$$f; \ + ln -s "$(CCACHE)" usr/bin/ccache/$(MXE_TOOL_PREFIX)$$f; \ fi; \ done && \ for f in gcc g++ gfortran; do \ if test ! -e usr/bin/ccache/$$f; then \ - ln -s /usr/bin/ccache usr/bin/ccache/$$f; \ + ln -s "$(CCACHE)" usr/bin/ccache/$$f; \ fi; \ done diff -r 2ee6a02e6f28 -r 990b5e6b1970 configure.ac --- a/configure.ac Wed Oct 10 14:31:19 2018 -0400 +++ b/configure.ac Wed Oct 10 14:39:43 2018 -0400 @@ -82,7 +82,7 @@ *) AC_MSG_ERROR([bad value "$enableval" for --with-ccache]) ;; esac], [USE_CCACHE=no]) if test "$USE_CCACHE" = yes; then - AC_CHECK_PROG(CCACHE, ccache, ccache) + AC_PATH_PROG(CCACHE, ccache) if test -z "$CCACHE"; then AC_MSG_WARN([ccache program not found; not using ccache for build]) USE_CCACHE=no