Chris@40: dnl @synopsis MN_C_COMPILER_IS_CLANG Chris@40: dnl Chris@40: dnl Find out if a compiler claiming to be gcc really is gcc (fuck you clang). Chris@40: dnl @version 1.0 Oct 31 2013 Chris@40: dnl @author Erik de Castro Lopo Chris@40: dnl Chris@40: dnl Permission to use, copy, modify, distribute, and sell this file for any Chris@40: dnl purpose is hereby granted without fee, provided that the above copyright Chris@40: dnl and this permission notice appear in all copies. No representations are Chris@40: dnl made about the suitability of this software for any purpose. It is Chris@40: dnl provided "as is" without express or implied warranty. Chris@40: dnl Chris@40: Chris@40: Chris@40: AC_DEFUN([MN_C_COMPILER_IS_CLANG], Chris@40: [AC_CACHE_CHECK(whether we are using the CLANG C compiler, Chris@40: mn_cv_c_compiler_clang, Chris@40: [ AC_LANG_ASSERT(C) Chris@40: AC_TRY_LINK([ Chris@40: #include Chris@40: ], Chris@40: [ Chris@40: #ifndef __clang__ Chris@40: This is not clang! Chris@40: #endif Chris@40: ], Chris@40: mn_cv_c_compiler_clang=yes, Chris@40: mn_cv_c_compiler_clang=no Chris@40: ]) Chris@40: ) Chris@40: ])