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: Diego Elio Pettenò
Subject: Re: [Bug-tar] [PATCH] Fix build with xattr support
Date: Thu, 12 Dec 2013 10:10:12 +0000


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@hiddenhttp://blog.flameeyes.eu/

reply via email to

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