From 71ed7ca0b8d905302b82af60653e9c13569286b0 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 14 Sep 2014 00:12:03 +0200 Subject: AX_LIB_HDF5: add support for recognizing HDF5 built with ccache The ax_lib_hdf5.m4 autoconf macro uses awk to determine which compiler was used to build HDF5. This fails if HDF5 was built using ccache because "ccache" is then used as HDF5_CC instead of the actual compiler wrapped by ccache. The attached patch fixes that. Submitted in . --- m4/ax_lib_hdf5.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'm4/ax_lib_hdf5.m4') diff --git a/m4/ax_lib_hdf5.m4 b/m4/ax_lib_hdf5.m4 index f4ab866..9e77b92 100644 --- a/m4/ax_lib_hdf5.m4 +++ b/m4/ax_lib_hdf5.m4 @@ -84,7 +84,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 9 AC_DEFUN([AX_LIB_HDF5], [ @@ -178,6 +178,9 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no). dnl Get the actual compiler used HDF5_CC=$(eval $H5CC -show | $AWK '{print $[]1}') + if test "$HDF5_CC" = "ccache"; then + HDF5_CC=$(eval $H5CC -show | $AWK '{print $[]2}') + fi dnl h5cc provides both AM_ and non-AM_ options dnl depending on how it was compiled either one of -- cgit v1.2.1