comparison src/libsamplerate-0.1.9/M4/add_cflags.m4 @ 41:481f5f8c5634

Current libsamplerate source
author Chris Cannam
date Tue, 18 Oct 2016 13:24:45 +0100
parents
children
comparison
equal deleted inserted replaced
40:1df64224f5ac 41:481f5f8c5634
1 dnl @synopsis AC_ADD_CFLAGS
2 dnl
3 dnl Add the given option to CFLAGS, if it doesn't break the compiler
4
5 AC_DEFUN([AC_ADD_CFLAGS],
6 [AC_MSG_CHECKING([if $CC accepts $1])
7 ac_add_cflags__old_cflags="$CFLAGS"
8 CFLAGS="$CFLAGS $1"
9 AC_TRY_LINK([
10 #include <stdio.h>
11 ],
12 [puts("Hello, World!"); return 0;],
13 AC_MSG_RESULT([yes]),
14 AC_MSG_RESULT([no])
15 CFLAGS="$ac_add_cflags__old_cflags"
16 )
17 ])# AC_ADD_CFLAGS