cannam@125: dnl @synopsis MN_GCC_REALLY_IS_GCC 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: # If the configure script has already detected GNU GCC, then make sure it cannam@125: # isn't CLANG masquerading as GCC. cannam@125: cannam@125: AC_DEFUN([MN_GCC_REALLY_IS_GCC], cannam@125: [ AC_LANG_ASSERT(C) cannam@125: if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then cannam@125: AC_TRY_LINK([ cannam@125: #include cannam@125: ], cannam@125: [ cannam@125: #ifdef __clang__ cannam@125: This is clang! cannam@125: #endif cannam@125: ], cannam@125: ac_cv_c_compiler_gnu=yes, cannam@125: ac_cv_c_compiler_gnu=no cannam@125: ) cannam@125: fi cannam@125: cannam@125: ])