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