X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=acinclude.m4;h=3362b4c385f592d380a8774acb7299503a87c729;hb=5f3f9ad231bc0c24d34c00e3936e226d9834589a;hp=c919e6c3df331fc3b92afde5b2581075d12225f6;hpb=681f7f3107f8d93b95b2f7b11a8fa1af966713f6;p=lyx.git diff --git a/acinclude.m4 b/acinclude.m4 index c919e6c3df..3362b4c385 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -286,6 +286,30 @@ if test $lyx_cv_broken_stack = yes ; then fi]) +dnl Usage: LYX_STD_COUNT : checks wherer the C++ library have a conforming +dnl count template, if not the old HP version is assumed. +AC_DEFUN(LYX_STD_COUNT,[ +AC_CACHE_CHECK(for conforming std::count,lyx_cv_std_count, + [AC_TRY_COMPILE([ +#include +#include +using std::string; +using std::count; +int countChar(string const & a, char const c) +{ + return count(a.begin(), a.end(), c); +} +],[ + string a("hello"); + int i = countChar(a, 'l'); +],lyx_cv_std_count=yes,lyx_cv_std_count=no) +]) +if test $lyx_cv_std_count = yes ; then + AC_DEFINE(HAVE_STD_COUNT, 1, + [Define if you have a conforming std::count template, otherwise HP version of count template is assumed.]) +fi]) + + dnl Usage: LYX_CXX_STL_MODERN_STREAMS : checks whether the C++ compiler dnl supports modern STL streams AC_DEFUN(LYX_CXX_STL_MODERN_STREAMS,[