AC_CHECK_LIB([acl], [acl_init], [ACLLIB='-lacl'])
if test -n "$ACLLIB"; then
HAVE_ACL="yes"
else
HAVE_ACL="no"
fi
if test x$HAVE_ACL = xyes ; then
AC_CHECK_LIB([archive], [acl_init], [LIBARCHIVEACL='-larchive -lacl'])
if test -n "$LIBARCHIVEACL"; then
AC_MSG_ERROR("libarchive was compiled with acl support but acl library not found! Install it!");
else
ACL="no"
fi
else
AC_CHECK_LIB([archive], [acl_init], [LIBARCHIVEACL='-larchive -lacl'])
if test -n "$LIBARCHIVEACL"; then
LDFLAGS="$LDFLAGS $ACLLIB"
ACL="yes"
else
ACL="no"
fi
fi