1dnl A function to check for the existence and usability of GMP. 2dnl Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com) 3dnl 4dnl This file is part of the Parma Polyhedra Library (PPL). 5dnl 6dnl The PPL is free software; you can redistribute it and/or modify it 7dnl under the terms of the GNU General Public License as published by the 8dnl Free Software Foundation; either version 3 of the License, or (at your 9dnl option) any later version. 10dnl 11dnl The PPL is distributed in the hope that it will be useful, but WITHOUT 12dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14dnl for more details. 15dnl 16dnl You should have received a copy of the GNU General Public License 17dnl along with this program; if not, write to the Free Software Foundation, 18dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 19dnl 20dnl For the most up-to-date information see the Parma Polyhedra Library 21dnl site: http://bugseng.com/products/ppl/ . 22 23AC_DEFUN([AC_CHECK_CXX11], 24[ 25AC_LANG_PUSH(C++) 26AC_MSG_CHECKING([if the C++ compiler supports C++11 features]) 27AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 28template <typename T> 29struct check final { 30 static constexpr T value{ __cplusplus }; 31}; 32 33typedef check<check<bool>> right_angle_brackets; 34 35int a; 36decltype(a) b; 37 38typedef check<int> check_type; 39check_type c{}; 40check_type&& cr = static_cast<check_type&&>(c); 41 42static_assert(check_type::value == 201103L, "C++11 compiler"); 43]])], 44 AC_MSG_RESULT(yes) 45 ac_cv_check_cxx11=yes, 46 AC_MSG_RESULT(no) 47 ac_cv_check_cx11=no 48 ) 49AC_LANG_POP(C++) 50if test "$ac_cv_check_cxx11" = yes; then 51 AC_DEFINE(HAVE_CXX11,, 52 [Defined if the C++compiler supports C++11 features.]) 53fi 54]) 55