Re: [PATCH v3 08/11] xfsprogs: Add fls check into autoconf

Jan Tulak
2015-08-14T12:59:46Z

[-- Attachment #1.1: Type: text/plain, Size: 1129 bytes --]

On Tue, Aug 4, 2015 at 2:12 PM, Jan Tulak <jtulak@redhat.com> wrote:

>
>
> ----- Original Message -----
> > From: "Christoph Hellwig" <hch@infradead.org>
> > To: "Jan Tulak" <jtulak@redhat.com>
> > Cc: hch@infradead.org, xfs@oss.sgi.com
> > Sent: Tuesday, August 4, 2015 1:21:03 PM
> > Subject: Re: [PATCH v3 08/11] xfsprogs: Add fls check into autoconf
> >
> > Can't you just use something like:
> >
> > AC_CHECK_DECL([fls],
> > [AC_DEFINE([HAVE_FLS_PROTOTYPE], [1],
> > [Define to 1 if have fls prototype])],
> > [],
> > [#include <string.h>])
> >
>
> You mean to replace the entire autoconf part of the patch with this?
> I will try it. Autoconf is still a bit of a black magic for me, so I
> used the already existing checks. :-)
>

Hi Chris,
did you want the result to be this? (I didn't get any clarification of what
you mean, so I'm asking again. :-) )

#
# 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)
])

Cheers,
Jan

--
Jan Tulak
jtulak@redhat.com

[-- Attachment #1.2: Type: text/html, Size: 2171 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]