summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-02-21 22:13:05 +0000
committerMorgan Deters <mdeters@gmail.com>2012-02-21 22:13:05 +0000
commitc0377cdf4aad1e4d7b073c91887db91f357c6395 (patch)
tree5d587b8f45b06b1449a8622a2042c0047f491bf9 /configure.ac
parent8b4754b8116c029b5314fccb39f200a6d0e90abd (diff)
fix src/util/hash.h to specialize GNU's hash template for <uint64_t> on platforms that need it; fixes Mac builds.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6f5568bd2..4b079facf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -676,6 +676,19 @@ if test "$enable_profiling" = yes; then
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }-pg"
fi
+# Check to see if this version/architecture of GNU C++ explicitly
+# instantiates __gnu_cxx::hash<uint64_t> or not. Some do, some don't.
+# See src/util/hash.h.
+AC_MSG_CHECKING([whether __gnu_cxx::hash<uint64_t> is already specialized])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE(AC_LANG_SOURCE([
+#include <stdint.h>
+#include <ext/hash_map>
+namespace __gnu_cxx { template<> struct hash<uint64_t> {}; }]),
+ [AC_MSG_RESULT([no]); CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_NEED_HASH_UINT64_T"],
+ [AC_MSG_RESULT([yes])])
+AC_LANG_POP([C++])
+
# Check for ANTLR runantlr script (defined in config/antlr.m4)
AC_PROG_ANTLR
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback