diff options
Diffstat (limited to 'gdbsupport/common.m4')
-rw-r--r-- | gdbsupport/common.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 index 7b100262c29..c6b9a25b744 100644 --- a/gdbsupport/common.m4 +++ b/gdbsupport/common.m4 @@ -215,6 +215,30 @@ AC_DEFUN([GDB_AC_COMMON], [ BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t) fi + + dnl xxhash support + # Check for xxhash + AC_ARG_WITH(xxhash, + AS_HELP_STRING([--with-xxhash], [use libxxhash for hashing (faster) (auto/yes/no)]), + [], [with_xxhash=auto]) + + if test "x$with_xxhash" != "xno"; then + AC_LIB_HAVE_LINKFLAGS([xxhash], [], + [#include <xxhash.h>], + [XXH32("foo", 3, 0); + ]) + if test "$HAVE_LIBXXHASH" != yes; then + if test "$with_xxhash" = yes; then + AC_MSG_ERROR([xxhash is missing or unusable]) + fi + fi + if test "x$with_xxhash" = "xauto"; then + with_xxhash="$HAVE_LIBXXHASH" + fi + fi + + AC_MSG_CHECKING([whether to use xxhash]) + AC_MSG_RESULT([$with_xxhash]) ]) dnl Check that the provided value ($1) is either "yes" or "no". If not, |