On 12/12/2013 05:10 AM, Diego Elio Pettenò wrote:
On Thu, Dec 12, 2013 at 10:03 AM, Pavel Raiskup <prais...@redhat.com> 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
flamee...@flameeyes.eu — http://blog.flameeyes.eu/


Sorry for the delay in responding, busy week.

I did test all possibilities and the code does work. But let me rework it using AC_SEARCH_LIBS and avoiding the AM_CONDITIONAL([TAR_LIB_ATTR]
and I'll resubmit.


--
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197

Reply via email to