Examples Makefile.
[Faustine.git] / interpretor / lib / src / libsndfile-1.0.25 / M4 / add_cxxflags.m4
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