]> granicus.if.org Git - php/commitdiff
- Fix the ccache detection
authorfoobar <sniper@php.net>
Wed, 30 Nov 2005 15:01:22 +0000 (15:01 +0000)
committerfoobar <sniper@php.net>
Wed, 30 Nov 2005 15:01:22 +0000 (15:01 +0000)
Makefile.gcov
configure.in

index 1c06d4089984082cc27ecea04e8dbe44be53fbee..073163fe6e1c501dc8bd1b6be5808b0c58cb908c 100644 (file)
@@ -5,12 +5,6 @@
 
 lcov: lcov-html
 
-lcov-ccache:
-       @if test -z "$(CCACHE_DISABLE)" || test "$(CCACHE_DISABLE)" != "1"; then \
-               echo "ccache is not disabled. Set environment variable CCACHE_DISABLE=1 to disable ccache."; \
-               exit 123; \
-       fi
-
 lcov-test: all
        @echo "Running test suite"
        @find . -name \*.gcda | xargs rm -f
index c944290187b5e9f47dcc80b0a88108d01a3f645b..aed49e2d1787c76bb328664b1098db8e22edc33f 100644 (file)
@@ -608,14 +608,13 @@ if test "$PHP_GCOV" = "yes"; then
   fi
   
   dnl Check if ccache is being used
-  dnl FIXME: Need a check for ccache usage, the one below does not work!
-  PHP_CHECK_GCC_ARG([--ccache-skip], [gcc_ccache=yes])
-  
-  if test "$gcc_ccache" = "yes"; then
-    if test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"; then
-      AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
-    fi
-    lcov_target="lcov-ccache"
+  case `$php_shtool path $CC` in
+    *ccache*[)] gcc_ccache=yes;;
+    *[)] gcc_ccache=no;;
+  esac
+
+  if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
+    AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
   
   ltp_version_list="1.4"