s3/packaging: Fix build on RHEL when ccache is not available.
[ira/wip.git] / packaging / RHEL / samba.spec.tmpl
index d3724d918029a3ef76aed0f8139d203f63d0b841..7818296fa6f1136de903bd76d741f9bf1296e74a 100644 (file)
@@ -122,8 +122,7 @@ cd source
 # RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
 
 ## check for ccache
- ccache -h 2>&1 > /dev/null
-if [ $? -eq 0 ]; then
+if [ "$(which ccache 2> /dev/null)" != "" ]; then
        CC="ccache gcc"
 else
        CC="gcc"