Home | History | Annotate | Download | only in m4
      1 dnl AX_CXXFLAGS_OPTIONS(var-name, option)
      2 dnl add option to var-name if $CXX support it.
      3 AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
      4 AC_MSG_CHECKING([whether ${CXX} support precompiled header])
      5 AC_LANG_SAVE
      6 AC_LANG_CPLUSPLUS
      7 SAVE_CXXFLAGS=$CXXFLAGS
      8 dnl we consider than if -Winvalid-pch is accepted pch will works ...
      9 CXXFLAGS=-Winvalid-pch
     10 dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
     11 dnl the fact than some pch will be invalid for the given compilation option
     12 AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
     13 CXXFLAGS=$SAVE_CXXFLAGS
     14 AC_LANG_RESTORE
     15 ])
     16