[Sheepdog] [PATCH] sheep: configure should check if libattr exists

dongsu.park at profitbricks.com dongsu.park at profitbricks.com
Thu Dec 29 15:58:04 CET 2011


From: Dongsu Park <dongsu.park at profitbricks.com>

configure should check if libattr.so exists under system lib dir,
as well as if its header file attr/xattr.h exists under /usr/include.
Without these checks, you could meet compile error when the devel
package for libattr does not exist, although you don't meet any error
in configure phase.

Signed-off-by: Dongsu Park <dongsu.park at profitbricks.com>
---
 configure.ac |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index d8db4c5..10b3a1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,11 @@ else
 	GDB_FLAGS="-g"
 fi
 
+AC_CHECK_LIB([attr], [setxattr],,
+	AC_MSG_ERROR(libattr not found))
+AC_CHECK_HEADERS([attr/xattr.h],,
+	AC_MSG_ERROR(xattr.h header missing))
+
 if test "x${enable_corosync}" = xyes; then
 	PKG_CHECK_MODULES([corosync],[corosync])
 	PKG_CHECK_MODULES([libcpg],[libcpg])
-- 
1.7.8.1




More information about the sheepdog mailing list