clean up autoconf of unordered_xx, prepare change to shared_ptr

Jean-Francois Dockes Jean-Francois Dockes 2015-08-09

changed src/common/autoconfig.h.in
changed src/common/rclconfig.h
changed src/common/textsplit.cpp
changed src/rcldb/rclabstract.cpp
changed src/rcldb/rclquery.cpp
changed src/unac/unac.c
changed src/utils/refcntr.h
changed src/utils/smallut.cpp
changed src/configure.ac
copied src/common/unordered_defs.h -> src/common/conf_post.h
src/common/autoconfig.h.in Diff Switch to side-by-side view
Loading...
src/common/rclconfig.h Diff Switch to side-by-side view
Loading...
src/common/textsplit.cpp Diff Switch to side-by-side view
Loading...
src/rcldb/rclabstract.cpp Diff Switch to side-by-side view
Loading...
src/rcldb/rclquery.cpp Diff Switch to side-by-side view
Loading...
src/unac/unac.c Diff Switch to side-by-side view
Loading...
src/utils/refcntr.h Diff Switch to side-by-side view
Loading...
src/utils/smallut.cpp Diff Switch to side-by-side view
Loading...
src/configure.ac Diff Switch to side-by-side view
Loading...
src/common/unordered_defs.h to src/common/conf_post.h
--- a/src/common/unordered_defs.h
+++ b/src/common/conf_post.h
@@ -1,19 +1,28 @@
-
-#include "autoconfig.h"
-
 #ifdef  HAVE_CXX0X_UNORDERED
-#  include <unordered_map>
-#  include <unordered_set>
+#  define UNORDERED_MAP_INCLUDE <unordered_map>
+#  define UNORDERED_SET_INCLUDE <unordered_set>
 #  define STD_UNORDERED_MAP std::unordered_map
 #  define STD_UNORDERED_SET std::unordered_set
 #elif defined(HAVE_TR1_UNORDERED)
-#  include <tr1/unordered_map>
-#  include <tr1/unordered_set>
+#  define UNORDERED_MAP_INCLUDE <tr1/unordered_map>
+#  define UNORDERED_SET_INCLUDE <tr1/unordered_set>
 #  define STD_UNORDERED_MAP std::tr1::unordered_map
 #  define STD_UNORDERED_SET std::tr1::unordered_set
 #else
-#  include <map>
-#  include <set>
+#  define UNORDERED_MAP_INCLUDE <map>
+#  define UNORDERED_SET_INCLUDE <set>
 #  define STD_UNORDERED_MAP std::map
 #  define STD_UNORDERED_SET std::set
 #endif
+
+#ifdef HAVE_SHARED_PTR_STD
+#  define MEMORY_INCLUDE <memory>
+#  define STD_SHARED_PTR    std::shared_ptr
+#elif defined(HAVE_SHARED_PTR_TR1)
+#  define MEMORY_INCLUDE <tr1/memory>
+#  define STD_SHARED_PTR    std::tr1::shared_ptr
+#else
+#  define MEMORY_INCLUDE "refcntr.h"
+#  define STD_SHARED_PTR    RefCntr
+#endif
+