Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
AC_HAVE_PREADV
AC_HAVE_SYNC_FILE_RANGE
AC_HAVE_MNTENT
+AC_HAVE_FLS
AC_HAVE_BLKID_TOPO
AC_HAVE_READDIR
* fls: find last bit set.
*/
+#ifndef HAVE_FLS
static inline int fls(int x)
{
int r = 32;
}
return r;
}
+#endif /* HAVE_FLS */
static inline int fls64(__u64 x)
{
HAVE_SYNC_FILE_RANGE = @have_sync_file_range@
HAVE_READDIR = @have_readdir@
HAVE_MNTENT = @have_mntent@
+HAVE_FLS = @have_fls@
GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
PCFLAGS = -I/usr/local/include $(GCCFLAGS)
DEPENDFLAGS = -D__FreeBSD__
endif
+ifeq ($(HAVE_FLS),yes)
+LCFLAGS+= -DHAVE_FLS
+endif
ifeq ($(HAVE_MNTENT),yes)
PCFLAGS+= -DHAVE_MNTENT
endif
AC_SUBST(have_readdir)
])
+#
+# Check if we have a flc call (Mac OS X)
+#
+AC_DEFUN([AC_HAVE_FLS],
+ [ AC_CHECK_DECL([fls],
+ have_fls=yes,
+ [],
+ [#include <string.h>]
+ )
+ AC_SUBST(have_fls)
+ ])
+
#
# Check if there is mntent.h
#