bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [PATCH] Fix build with xattr support


From: Anthony G. Basile
Subject: Re: [Bug-tar] [PATCH] Fix build with xattr support
Date: Mon, 16 Dec 2013 09:34:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 12/12/2013 05:10 AM, Diego Elio Pettenò wrote:
On Thu, Dec 12, 2013 at 10:03 AM, Pavel Raiskup <address@hidden> 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
address@hidden — 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

[Prev in Thread] Current Thread [Next in Thread]