Patchwork [04/11] configure.ac: check for presence of libattr

login
register
mail settings
Submitter Chuck Lever
Date July 2, 2013, 7:31 p.m.
Message ID <20130702193107.48202.27157.stgit@manray.1015granger.net>
Download mbox | patch
Permalink /patch/256487/
State Accepted
Headers show

Comments

Chuck Lever - July 2, 2013, 7:31 p.m.
libattr.so and headers under /usr/include/attr/ should be called out
by configure.ac if they can't be found on the build system.

Introduced by commit 0520ee72 "Initial commit", Tue Mar 29 15:37:40
2011.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 configure.ac |    5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/configure.ac b/configure.ac
index 0965cfd..7e304ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,6 +139,11 @@  AC_CHECK_LIB([ssl], [SSL_CTX_new],
 		 AC_DEFINE([HAVE_LIBSSL], [1],
 			   [Define if you have libssl])],
 		[AC_MSG_ERROR([libssl not found.])])
+AC_CHECK_LIB([attr], [fgetxattr],
+		[AC_SUBST([LIBATTR], ["-lattr"])
+		 AC_DEFINE([HAVE_LIBATTR], [1],
+			   [Define if you have libattr])],
+		[AC_MSG_ERROR([libattr not found.])])
 
 # Checks for header files.
 AC_CHECK_HEADERS([fcntl.h langinfo.h locale.h memory.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h syslog.h termios.h unistd.h wchar.h])