diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-08-02 14:18:22 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-08-05 15:10:39 +0200 |
commit | 1e0feb5cf916fada5dc2db66a358649624ece578 (patch) | |
tree | fb30b714baaafc5671862a1311b3d26a3961a5bc /configure.ac | |
parent | 00657c3b1ed5843d15dbc3aea8fa57be056b0935 (diff) |
do not base feature checks on gcc version
Clang reports itself to be gcc4.2, so there fail there, instead use configure
checks.
Change-Id: Idb44a5c875b24a15546a6495de02a1b4af898443
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c623f386d883..9ed63e26137d 100644 --- a/configure.ac +++ b/configure.ac @@ -5718,6 +5718,17 @@ if test "$GCC" = "yes"; then ], [AC_MSG_RESULT([no])]) CFLAGS=$save_CFLAGS + AC_MSG_CHECKING([whether $CC supports __attribute__((deprecated(message)))]) + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + __attribute__((deprecated(test))) void f(); + ])], [ + AC_DEFINE([HAVE_GCC_DEPRECATED_MESSAGE],[1]) + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) + CFLAGS=$save_CFLAGS + AC_MSG_CHECKING([whether $CXX declares __cxa_allocate_exception in cxxabi.h]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -6086,6 +6097,25 @@ if test "$HAVE_CXX11" = "TRUE"; then fi fi +HAVE_GCC_PRAGMA_OPERATOR= +dnl _Pragma support (may require C++11) +if test "$GCC" = "yes"; then + AC_MSG_CHECKING([whether $CXX supports _Pragma operator]) + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + _Pragma("GCC diagnostic ignored \"-Wformat\"") + ])], [ + AC_DEFINE([HAVE_GCC_PRAGMA_OPERATOR],[1]) + HAVE_GCC_PRAGMA_OPERATOR=1 + AC_MSG_RESULT([yes]) + ], [AC_MSG_RESULT([no])]) + AC_LANG_POP([C++]) + CXXFLAGS=$save_CXXFLAGS +fi +AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR) + dnl =================================================================== dnl system stl sanity tests dnl =================================================================== |