mirror of
https://github.com/OlafvdSpek/ctemplate.git
synced 2025-09-28 19:05:49 +08:00
Remove ac_cv_cxx_hash_map_class
This commit is contained in:
parent
02259b0928
commit
44b7c5b918
49
configure.ac
49
configure.ac
|
@ -36,7 +36,6 @@ AH_BOTTOM([
|
|||
])
|
||||
AM_CONDITIONAL(MINGW, expr $host : '.*-mingw' >/dev/null 2>&1)
|
||||
|
||||
# Uncomment this if you'll be exporting libraries (.so's)
|
||||
LT_INIT([disable-fast-install])
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
AC_SUBST(SO_VERSION)
|
||||
|
@ -79,51 +78,17 @@ AC_INTERLOCKED_EXCHANGE_NONVOLATILE
|
|||
# Figures out where hash_map and hash_set live, and what namespace they use
|
||||
AC_CXX_STL_HASH
|
||||
|
||||
# If we found tr1/unordered_map, prefer unordered_map/unordered_set to
|
||||
# hash_map/hash_set.
|
||||
if test "$ac_cv_cxx_have_unordered_map" = yes; then
|
||||
ac_cv_cxx_hash_map_class="$ac_cv_cxx_hash_namespace::unordered_map"
|
||||
ac_cv_cxx_hash_set_class="$ac_cv_cxx_hash_namespace::unordered_set"
|
||||
else
|
||||
ac_cv_cxx_hash_map_class="$ac_cv_cxx_hash_namespace::hash_map"
|
||||
ac_cv_cxx_hash_set_class="$ac_cv_cxx_hash_namespace::hash_set"
|
||||
fi
|
||||
|
||||
AC_SUBST(ac_google_namespace)
|
||||
AC_SUBST(ac_google_start_namespace)
|
||||
AC_SUBST(ac_google_end_namespace)
|
||||
AC_SUBST(ac_cv_cxx_hash_namespace)
|
||||
AC_SUBST(ac_cv_cxx_hash_map)
|
||||
AC_SUBST(ac_cv_cxx_hash_set)
|
||||
AC_SUBST(ac_cv_cxx_hash_map_class)
|
||||
AC_SUBST(ac_cv_cxx_hash_set_class)
|
||||
|
||||
if test "$ac_cv___attribute__" = "yes"; then
|
||||
AC_SUBST(ac_google_attribute, 1)
|
||||
else
|
||||
AC_SUBST(ac_google_attribute, 0)
|
||||
fi
|
||||
if test "$ac_cv_type_u_int64_t" = "yes"; then
|
||||
AC_SUBST(ac_cv_uint64, u_int64_t)
|
||||
elif test "$ac_cv_type_uint64_t" = "yes"; then
|
||||
AC_SUBST(ac_cv_uint64, uint64_t)
|
||||
elif test "$ac_cv_type___int64" = "yes"; then
|
||||
AC_SUBST(ac_cv_uint64, unsigned __int64)
|
||||
else
|
||||
AC_SUBST(ac_cv_uint64, unsigned long long) # best we can do
|
||||
fi
|
||||
# These are used by template_string.h.in
|
||||
if test "$ac_cv_header_stdint_h" = "yes"; then
|
||||
AC_SUBST(ac_cv_have_stdint_h, 1)
|
||||
else
|
||||
AC_SUBST(ac_cv_have_stdint_h, 0)
|
||||
fi
|
||||
if test "$ac_cv_header_inttypes_h" = "yes"; then
|
||||
AC_SUBST(ac_cv_have_inttypes_h, 1)
|
||||
else
|
||||
AC_SUBST(ac_cv_have_inttypes_h, 0)
|
||||
fi
|
||||
|
||||
|
||||
# One some systems (eg gnu/linux), the linker defines _start and
|
||||
# On some systems (eg gnu/linux), the linker defines _start and
|
||||
# data_start to indicate the extent of the .text section. We can use
|
||||
# this to know strings are immutable. In the code, we make the
|
||||
# variables weak, just in case, but for this check, we only want to
|
||||
|
@ -151,14 +116,6 @@ ac_windows_dllexport=
|
|||
AC_SUBST(ac_windows_dllexport_defines)
|
||||
AC_SUBST(ac_windows_dllexport)
|
||||
|
||||
# This will (should) never change, but we put it here so if we do need
|
||||
# to change it, to avoid naming conflicts or something, it's easy to
|
||||
# do in one place.
|
||||
ac_htmlparser_namespace=ctemplate_htmlparser
|
||||
AC_SUBST(ac_htmlparser_namespace)
|
||||
AC_DEFINE_UNQUOTED(HTMLPARSER_NAMESPACE, $ac_htmlparser_namespace,
|
||||
[The namespace to put the htmlparser code.])
|
||||
|
||||
# Write generated configuration file, and also .h files
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
src/ctemplate/template_string.h \
|
||||
|
|
|
@ -128,7 +128,7 @@ class @ac_windows_dllexport@ PerExpandData {
|
|||
struct DataEq {
|
||||
bool operator()(const char* s1, const char* s2) const;
|
||||
};
|
||||
typedef @ac_cv_cxx_hash_map_class@<const char*, const void*, StringHash, DataEq> DataMap;
|
||||
typedef @ac_cv_cxx_hash_namespace@::unordered_map<const char*, const void*, StringHash, DataEq> DataMap;
|
||||
|
||||
const char* annotate_path_;
|
||||
TemplateAnnotator* annotator_;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#ifndef TEMPLATE_TEMPLATE_CACHE_H_
|
||||
#define TEMPLATE_TEMPLATE_CACHE_H_
|
||||
|
||||
#include @ac_cv_cxx_hash_map@ // for @ac_cv_cxx_hash_map_class@<>
|
||||
#include @ac_cv_cxx_hash_map@
|
||||
#include <string> // for string
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector<>
|
||||
|
@ -278,9 +278,8 @@ class @ac_windows_dllexport@ TemplateCache {
|
|||
public:
|
||||
typedef std::pair<TemplateId, int> TemplateCacheKey;
|
||||
private:
|
||||
typedef @ac_cv_cxx_hash_map_class@<TemplateCacheKey, CachedTemplate, TemplateCacheHash>
|
||||
TemplateMap;
|
||||
typedef @ac_cv_cxx_hash_map_class@<RefcountedTemplate*, int, RefTplPtrHash> TemplateCallMap;
|
||||
typedef @ac_cv_cxx_hash_namespace@::unordered_map<TemplateCacheKey, CachedTemplate, TemplateCacheHash> TemplateMap;
|
||||
typedef @ac_cv_cxx_hash_namespace@::unordered_map<RefcountedTemplate*, int, RefTplPtrHash> TemplateCallMap;
|
||||
// Where to search for files.
|
||||
typedef std::vector<std::string> TemplateSearchPath;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class @ac_windows_dllexport@ TemplateNamelist {
|
|||
// thing you should do with them is call size() and/or iterate
|
||||
// between begin() and end(), and the only operations we promise
|
||||
// the iterators will support are operator* and operator++.
|
||||
typedef @ac_cv_cxx_hash_set_class@<std::string, StringHash> NameListType;
|
||||
typedef @ac_cv_cxx_hash_namespace@::unordered_set<std::string, StringHash> NameListType;
|
||||
typedef std::vector<std::string> MissingListType;
|
||||
typedef std::vector<std::string> SyntaxListType;
|
||||
|
||||
|
|
|
@ -39,13 +39,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include <assert.h>
|
||||
#if @ac_cv_have_stdint_h@
|
||||
#include <stdint.h> // one place @ac_cv_unit64@ might live
|
||||
#endif
|
||||
#if @ac_cv_have_inttypes_h@
|
||||
#include <inttypes.h> // another place @ac_cv_unit64@ might live
|
||||
#endif
|
||||
#include <sys/types.h> // final place @ac_cv_unit64@ might live
|
||||
#include <cstdint>
|
||||
|
||||
class TemplateStringTest; // needed for friendship declaration
|
||||
class StaticTemplateStringTest;
|
||||
|
@ -130,7 +124,7 @@ struct @ac_windows_dllexport@ StaticTemplateString {
|
|||
} do_not_use_directly_;
|
||||
|
||||
// This class is a good hash functor to pass in as the third
|
||||
// argument to @ac_cv_cxx_hash_map_class@<>, when creating a map whose keys are
|
||||
// argument to unordered_map<>, when creating a map whose keys are
|
||||
// StaticTemplateString. NOTE: This class isn't that safe to use,
|
||||
// because it requires that StaticTemplateStringInitializer has done
|
||||
// its job. Unfortunately, even when you use the STS_INIT macro
|
||||
|
|
Loading…
Reference in New Issue
Block a user