From 4176ce096510479b797ea78d60ec753e340b32dc Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 26 Jan 2016 16:34:24 +0000 Subject: * configure.ac (ac_cv_std_swap_in_utility): New test. * system.h (): Check HAVE_SWAP_IN_UTILITY as well. * configure: Regenerate. * config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232836 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/configure.ac') diff --git a/gcc/configure.ac b/gcc/configure.ac index 4dc7c109a26..6cfb68a8520 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -416,6 +416,15 @@ struct X { typedef long long t; }; ]], [[X::t x;]])],[],[AC_MSG_ERROR([error verifying int64_t uses long long])]) fi +AC_CACHE_CHECK(for std::swap in , ac_cv_std_swap_in_utility, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +]], [[int a, b; std::swap(a,b);]])],[ac_cv_std_swap_in_utility=yes],[ac_cv_std_swap_in_utility=no])]) +if test $ac_cv_std_swap_in_utility = yes; then + AC_DEFINE(HAVE_SWAP_IN_UTILITY, 1, + [Define if defines std::swap.]) +fi + # Check whether compiler is affected by placement new aliasing bug (PR 29286). # If the host compiler is affected by the bug, and we build with optimization # enabled (which happens e.g. when cross-compiling), the pool allocator may -- cgit v1.2.1