Mercurial > hg > sv-dependency-builds
comparison src/libsndfile-1.0.27/M4/add_cflags.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 |
comparison
equal
deleted
inserted
replaced
124:e3d5853d5918 | 125:cd6cdf86811e |
---|---|
1 dnl @synopsis MN_ADD_CFLAGS | |
2 dnl | |
3 dnl Add the given option to CFLAGS, if it doesn't break the compiler | |
4 | |
5 AC_DEFUN([MN_ADD_CFLAGS], | |
6 [AC_MSG_CHECKING([if $CC accepts $1]) | |
7 ac_add_cflags__old_cflags="$CFLAGS" | |
8 CFLAGS="$1" | |
9 AC_TRY_LINK([ | |
10 #include <stdio.h> | |
11 ], | |
12 [puts("Hello, World!"); return 0;], | |
13 AC_MSG_RESULT([yes]) | |
14 CFLAGS="$ac_add_cflags__old_cflags $1", | |
15 AC_MSG_RESULT([no]) | |
16 CFLAGS="$ac_add_cflags__old_cflags" | |
17 ) | |
18 ])# MN_ADD_CFLAGS |