From: Jan Tulak <jtulak@redhat.com>
To: xfs@oss.sgi.com
Cc: hch@infradead.org, Jan Tulak <jtulak@redhat.com>
Subject: [PATCH v4 03/11] xfsprogs: Add fls check into autoconf
Date: Mon, 17 Aug 2015 17:02:31 +0200 [thread overview]
Message-ID: <1439823751-7335-1-git-send-email-jtulak@redhat.com> (raw)
In-Reply-To: <117593154.2602203.1438690346097.JavaMail.zimbra@redhat.com>
UPDATE: Autoconf change. Hopefully this is what Chris meant.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
configure.ac | 1 +
include/bitops.h | 2 ++
include/builddefs.in | 4 ++++
m4/package_libcdev.m4 | 12 ++++++++++++
4 files changed, 19 insertions(+)
diff --git a/configure.ac b/configure.ac
index 0aba90c..abb7904 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,7 @@ AC_HAVE_FIEMAP
AC_HAVE_PREADV
AC_HAVE_SYNC_FILE_RANGE
AC_HAVE_MNTENT
+AC_HAVE_FLS
AC_HAVE_BLKID_TOPO
AC_HAVE_READDIR
diff --git a/include/bitops.h b/include/bitops.h
index 930f64a..44599a7 100644
--- a/include/bitops.h
+++ b/include/bitops.h
@@ -5,6 +5,7 @@
* fls: find last bit set.
*/
+#ifndef HAVE_FLS
static inline int fls(int x)
{
int r = 32;
@@ -32,6 +33,7 @@ static inline int fls(int x)
}
return r;
}
+#endif /* HAVE_FLS */
static inline int fls64(__u64 x)
{
diff --git a/include/builddefs.in b/include/builddefs.in
index e522243..8851956 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -104,6 +104,7 @@ HAVE_PREADV = @have_preadv@
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
@@ -131,6 +132,9 @@ PLDLIBS = -L/usr/local/lib -lintl
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
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 75aa61e..4a96374 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -203,6 +203,18 @@ AC_DEFUN([AC_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
#
AC_DEFUN([AC_HAVE_MNTENT],
--
2.4.3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-08-17 15:02 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 14:39 [PATCH v3 00/11] xfsprogs: OS X partial support Jan Tulak
2015-08-03 14:39 ` [PATCH v2 01/11] xfsprogs: Don't Make .po files with gettext disabled Jan Tulak
2015-08-03 14:39 ` [PATCH v2 02/11] xfsprogs: Use glibtoolize on osx Jan Tulak
2015-08-03 14:39 ` [PATCH v3 03/11] xfsprogs: undefined variable fix Jan Tulak
2015-08-04 8:41 ` Christoph Hellwig
2015-08-03 14:39 ` [PATCH v3 04/11] xfsprogs: Add ifdef dirent checks where it was missing Jan Tulak
2015-08-04 8:46 ` Christoph Hellwig
2015-08-04 9:21 ` Jan Tulak
2015-08-04 9:25 ` [PATCH v4 " Jan Tulak
2015-08-04 11:18 ` Christoph Hellwig
2015-08-04 14:19 ` Jan Tulak
2015-08-04 23:00 ` Dave Chinner
2015-08-05 9:49 ` Jan Tulak
2015-08-05 9:48 ` [PATCH v5 " Jan Tulak
2015-08-03 14:39 ` [PATCH v3 05/11] xfsprogs: Change OS X-specific CFLAGS/LDFLAGS Jan Tulak
2015-08-04 11:17 ` Christoph Hellwig
2015-08-03 14:39 ` [PATCH v3 06/11] xfsprogs: Add includes required for OS X builds Jan Tulak
2015-08-04 11:18 ` Christoph Hellwig
2015-08-13 14:07 ` [PATCH " Jan Tulak
2015-08-03 14:39 ` [PATCH v3 07/11] xfsprogs: missing and dummy calls for OS X support Jan Tulak
2015-08-03 14:39 ` [PATCH v3 08/11] xfsprogs: Add fls check into autoconf Jan Tulak
2015-08-04 11:21 ` Christoph Hellwig
2015-08-04 12:12 ` Jan Tulak
2015-08-14 12:59 ` Jan Tulak
2015-08-17 15:02 ` Jan Tulak [this message]
2015-08-03 14:39 ` [PATCH v3 09/11] xfsprogs: Add mntent.h " Jan Tulak
2015-08-04 11:21 ` Christoph Hellwig
2015-08-17 15:01 ` [PATCH v4 " Jan Tulak
2015-08-17 15:04 ` Christoph Hellwig
2015-08-17 15:15 ` Jan Tulak
2015-08-03 14:39 ` [PATCH v3 10/11] xfsprogs: replace obsolete memalign with posix_memalign Jan Tulak
2015-08-05 22:57 ` Dave Chinner
2015-08-13 14:08 ` [PATCH " Jan Tulak
2015-08-03 14:39 ` [PATCH v2 11/11] xfsprogs: Prefix LIST_... macros to XFS_LIST_ Jan Tulak
2015-08-04 9:01 ` [PATCH v4 11/11] xfsprogs: prevent LIST_ macros conflicts Jan Tulak
2015-08-04 11:22 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439823751-7335-1-git-send-email-jtulak@redhat.com \
--to=jtulak@redhat.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox