On Thu, Dec 12, 2013 at 10:03 AM, Pavel Raiskup <[email protected]> wrote:

> This is IMO not going to work.  AC_CHECK_FUNCS will not success if you
> don't have libc with xattrs support;  you should use AC_SEARCH_LIBS (in
> 'attr' library).  Look at configure.ac and acl-related checks.
>

Actually, Anthony is right and this will work.

AC_CHECK_LIB([attr], [fgetxattr])

will add -lattr to LIBS. Afterwards, AC_CHECK_FUNCS will use $LIBS when
linking so it'll pick up -lattr.

Of course AC_SEARCH_LIBS is also an option, as it avoids linking in a
fictitious libattr if the OS provides it for compatibility reasons while
providing the functions as part of the C library.

But the code is not wrong in that regard :)


Diego Elio Pettenò — Flameeyes
[email protected]http://blog.flameeyes.eu/

Reply via email to