+
# Process this file with autoconf to produce a configure script.
#
# This file is part of DisOrder.
if test ! -z "$missing_functions"; then
AC_MSG_ERROR([missing functions:$missing_functions])
fi
+
+# Functions we can take or leave
+AC_CHECK_FUNCS([fls])
+
if test $want_server = yes; then
# <db.h> had better be version 3 or later
AC_CACHE_CHECK([db.h version],[rjk_cv_db_version],[
#ifndef BITS_H
#define BITS_H
+#include <string.h> /* for fls() */
+
+#if HAVE_FLS
+static inline int leftmost_bit(uint32_t n) {
+ return fls(n) - 1;
+}
+#else
int leftmost_bit(uint32_t n);
+#endif
#endif /* BITS_H */