| OLD | NEW |
| 1 # We check two things: where the include file is for | 1 # We check two things: where the include file is for |
| 2 # unordered_map/hash_map (we prefer the first form), and what | 2 # unordered_map/hash_map (we prefer the first form), and what |
| 3 # namespace unordered/hash_map lives in within that include file. We | 3 # namespace unordered/hash_map lives in within that include file. We |
| 4 # include AC_TRY_COMPILE for all the combinations we've seen in the | 4 # include AC_TRY_COMPILE for all the combinations we've seen in the |
| 5 # wild. We define HASH_MAP_H to the location of the header file, and | 5 # wild. We define HASH_MAP_H to the location of the header file, and |
| 6 # HASH_NAMESPACE to the namespace the class (unordered_map or | 6 # HASH_NAMESPACE to the namespace the class (unordered_map or |
| 7 # hash_map) is in. We define HAVE_UNORDERED_MAP if the class we found | 7 # hash_map) is in. |
| 8 # is named unordered_map, or leave it undefined if not. | |
| 9 | 8 |
| 10 # This also checks if unordered map exists. | 9 # This also checks if unordered map exists. |
| 11 AC_DEFUN([AC_CXX_STL_HASH], | 10 AC_DEFUN([AC_CXX_STL_HASH], |
| 12 [ | 11 [ |
| 13 AC_MSG_CHECKING(the location of hash_map) | 12 AC_MSG_CHECKING(the location of hash_map) |
| 14 AC_LANG_SAVE | 13 AC_LANG_SAVE |
| 15 AC_LANG_CPLUSPLUS | 14 AC_LANG_CPLUSPLUS |
| 16 ac_cv_cxx_hash_map="" | 15 ac_cv_cxx_hash_map="" |
| 17 # First try unordered_map, but not on gcc's before 4.2 -- I've | 16 # First try unordered_map, but not on gcc's before 4.2 -- I've |
| 18 # seen unexplainable unordered_map bugs with -O2 on older gcc's. | 17 # seen unexplainable unordered_map bugs with -O2 on older gcc's. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 [the name of <hash_map>]) | 62 [the name of <hash_map>]) |
| 64 AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, | 63 AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, |
| 65 [the name of <hash_set>]) | 64 [the name of <hash_set>]) |
| 66 AC_MSG_RESULT([$ac_cv_cxx_hash_map]) | 65 AC_MSG_RESULT([$ac_cv_cxx_hash_map]) |
| 67 else | 66 else |
| 68 AC_MSG_RESULT() | 67 AC_MSG_RESULT() |
| 69 AC_MSG_WARN([could not find an STL hash_map]) | 68 AC_MSG_WARN([could not find an STL hash_map]) |
| 70 fi | 69 fi |
| 71 ]) | 70 ]) |
| 72 | 71 |
| OLD | NEW |