Use location of TIOCGWINSZ from autoconf manual
[platform/upstream/flac.git] / m4 / add_cxxflags.m4
1 dnl @synopsis XIPH_ADD_CXXFLAGS
2 dnl
3 dnl Add the given option to CXXFLAGS, if it doesn't break the compiler
4
5 AC_DEFUN([XIPH_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 ])# XIPH_ADD_CXXFLAGS