1dnl SPDX-License-Identifier: GPL-2.0-or-later
2dnl Copyright (c) Linux Test Project, 2011
3dnl Author: Cyril Hrubis <chrubis@suse.cz>
4
5AC_DEFUN([LTP_CHECK_ACL_SUPPORT], [
6	AC_CHECK_LIB([acl], [acl_init], [have_libacl=yes], [AC_MSG_WARN(missing libacl)])
7	AC_CHECK_HEADERS([sys/acl.h], [have_acl=yes], [AC_MSG_WARN(missing libacl headers)])
8	if test "x$have_libacl" = "xyes" -a "x$have_acl" = "xyes"; then
9		AC_DEFINE(HAVE_LIBACL, 1, [Define to 1 if you have libacl and it's headers installed])
10	    AC_SUBST(ACL_LIBS, "-lacl")
11	fi
12])
13