Mercurial > hg > sv-dependency-builds
diff src/libsndfile-1.0.27/M4/clang.m4 @ 40:1df64224f5ac
Current libsndfile source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:22:47 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libsndfile-1.0.27/M4/clang.m4 Tue Oct 18 13:22:47 2016 +0100 @@ -0,0 +1,31 @@ +dnl @synopsis MN_C_COMPILER_IS_CLANG +dnl +dnl Find out if a compiler claiming to be gcc really is gcc (fuck you clang). +dnl @version 1.0 Oct 31 2013 +dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com> +dnl +dnl Permission to use, copy, modify, distribute, and sell this file for any +dnl purpose is hereby granted without fee, provided that the above copyright +dnl and this permission notice appear in all copies. No representations are +dnl made about the suitability of this software for any purpose. It is +dnl provided "as is" without express or implied warranty. +dnl + + +AC_DEFUN([MN_C_COMPILER_IS_CLANG], +[AC_CACHE_CHECK(whether we are using the CLANG C compiler, + mn_cv_c_compiler_clang, + [ AC_LANG_ASSERT(C) + AC_TRY_LINK([ + #include <stdio.h> + ], + [ + #ifndef __clang__ + This is not clang! + #endif + ], + mn_cv_c_compiler_clang=yes, + mn_cv_c_compiler_clang=no + ]) + ) +])