comparison 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
comparison
equal deleted inserted replaced
39:7ddb4fc30dac 40:1df64224f5ac
1 dnl @synopsis MN_C_COMPILER_IS_CLANG
2 dnl
3 dnl Find out if a compiler claiming to be gcc really is gcc (fuck you clang).
4 dnl @version 1.0 Oct 31 2013
5 dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
6 dnl
7 dnl Permission to use, copy, modify, distribute, and sell this file for any
8 dnl purpose is hereby granted without fee, provided that the above copyright
9 dnl and this permission notice appear in all copies. No representations are
10 dnl made about the suitability of this software for any purpose. It is
11 dnl provided "as is" without express or implied warranty.
12 dnl
13
14
15 AC_DEFUN([MN_C_COMPILER_IS_CLANG],
16 [AC_CACHE_CHECK(whether we are using the CLANG C compiler,
17 mn_cv_c_compiler_clang,
18 [ AC_LANG_ASSERT(C)
19 AC_TRY_LINK([
20 #include <stdio.h>
21 ],
22 [
23 #ifndef __clang__
24 This is not clang!
25 #endif
26 ],
27 mn_cv_c_compiler_clang=yes,
28 mn_cv_c_compiler_clang=no
29 ])
30 )
31 ])