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