X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_stl_hash.m4;h=9cd92783d53b8f781e06fe932bcfdb13b04ff19c;hb=dd175adb52ed8a5ab9ca125060f50b6185c60047;hp=adf25611c546653bd1990670e36898d669ae2f65;hpb=604540c15315c6ed876082529f639697ba3eceab;p=m6w6%2Flibmemcached diff --git a/m4/pandora_stl_hash.m4 b/m4/pandora_stl_hash.m4 index adf25611..9cd92783 100644 --- a/m4/pandora_stl_hash.m4 +++ b/m4/pandora_stl_hash.m4 @@ -50,6 +50,38 @@ AC_DEFUN([PANDORA_CXX_STL_HASH], AC_MSG_RESULT() AC_MSG_WARN([could not find an STL hash_map]) fi + AC_CACHE_CHECK( + [whether hash_map has rehash method], + [ac_cv_hash_map_has_rehash], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#include HASH_MAP_H +using namespace HASH_NAMESPACE; + ]],[[ +HASH_MAP_CLASS test_hash; +test_hash.rehash(100); + ]])], + [ac_cv_hash_map_has_rehash=yes], + [ac_cv_hash_map_has_rehash=no])]) + AS_IF([test $ac_cv_hash_map_has_rehash = yes],[ + AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method]) + ]) + AC_CACHE_CHECK( + [whether hash_map has resize method], + [ac_cv_hash_map_has_resize], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#include HASH_MAP_H +using namespace HASH_NAMESPACE; + ]],[[ +HASH_MAP_CLASS test_hash; +test_hash.resize(100); + ]])], + [ac_cv_hash_map_has_resize=yes], + [ac_cv_hash_map_has_resize=no])]) + AS_IF([test $ac_cv_hash_map_has_resize = yes],[ + AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method]) + ]) AC_CACHE_CHECK( [whether to redefine hash], [ac_cv_redefine_hash_string],