annotate src/libsndfile-1.0.27/M4/clang.m4 @ 125:cd6cdf86811e

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