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