[3/5] configure.ac: check for presence of libattr

Submitted by Chuck Lever on June 3, 2013, 3:44 p.m.

Details

Message ID 20130603154450.37741.82435.stgit@manray.1015granger.net
State Accepted
Headers show

Commit Message

Chuck Lever June 3, 2013, 3:44 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 hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index deb457a..fad96c8 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])