xref: /aosp_15_r20/external/ltp/m4/ltp-acl.m4 (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Workerdnl SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Workerdnl Copyright (c) Linux Test Project, 2011
3*49cdfc7eSAndroid Build Coastguard Workerdnl Author: Cyril Hrubis <[email protected]>
4*49cdfc7eSAndroid Build Coastguard Worker
5*49cdfc7eSAndroid Build Coastguard WorkerAC_DEFUN([LTP_CHECK_ACL_SUPPORT], [
6*49cdfc7eSAndroid Build Coastguard Worker	AC_CHECK_LIB([acl], [acl_init], [have_libacl=yes], [AC_MSG_WARN(missing libacl)])
7*49cdfc7eSAndroid Build Coastguard Worker	AC_CHECK_HEADERS([sys/acl.h], [have_acl=yes], [AC_MSG_WARN(missing libacl headers)])
8*49cdfc7eSAndroid Build Coastguard Worker	if test "x$have_libacl" = "xyes" -a "x$have_acl" = "xyes"; then
9*49cdfc7eSAndroid Build Coastguard Worker		AC_DEFINE(HAVE_LIBACL, 1, [Define to 1 if you have libacl and it's headers installed])
10*49cdfc7eSAndroid Build Coastguard Worker	    AC_SUBST(ACL_LIBS, "-lacl")
11*49cdfc7eSAndroid Build Coastguard Worker	fi
12*49cdfc7eSAndroid Build Coastguard Worker])
13