1dnl @synopsis XIPH_C_COMPILER_IS_CLANG 2dnl 3dnl Find out if a compiler claiming to be gcc really is gcc (clang lies). 4dnl @version 1.0 Oct 31 2013 5dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com> 6dnl 7dnl Permission to use, copy, modify, distribute, and sell this file for any 8dnl purpose is hereby granted without fee, provided that the above copyright 9dnl and this permission notice appear in all copies. No representations are 10dnl made about the suitability of this software for any purpose. It is 11dnl provided "as is" without express or implied warranty. 12dnl 13 14 15AC_DEFUN([XIPH_C_COMPILER_IS_CLANG], 16[AC_CACHE_CHECK(whether we are using the CLANG C compiler, 17 xiph_cv_c_compiler_clang, 18 [ AC_LANG_ASSERT(C) 19 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 20 #include <stdio.h> 21 ]], [[ 22 #ifndef __clang__ 23 This is not clang! 24 #endif 25 ]])],[xiph_cv_c_compiler_clang=yes],[xiph_cv_c_compiler_clang=no 26 ])] 27 )] 28) 29