comparison src/libsndfile-1.0.25/M4/add_cxxflags.m4 @ 0:c7265573341e

Import initial set of sources
author Chris Cannam
date Mon, 18 Mar 2013 14:12:14 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c7265573341e
1 dnl @synopsis MN_ADD_CXXFLAGS
2 dnl
3 dnl Add the given option to CXXFLAGS, if it doesn't break the compiler
4
5 AC_DEFUN([MN_ADD_CXXFLAGS],
6 [AC_MSG_CHECKING([if $CXX accepts $1])
7 AC_LANG_ASSERT([C++])
8 ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
9 CXXFLAGS="$1"
10 AC_TRY_LINK([
11 #include <cstdio>
12 ],
13 [puts("Hello, World!"); return 0;],
14 AC_MSG_RESULT([yes])
15 CXXFLAGS="$ac_add_cxxflags__old_cxxflags $1",
16 AC_MSG_RESULT([no])
17 CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
18 )
19 ])# MN_ADD_CXXFLAGS