1 AC_DEFUN([AC_CHECK_SMACK],[
2 AC_MSG_CHECKING([whether SMACK development version is installed])
6 AC_ARG_WITH([smack-path],
7 AC_HELP_STRING([--with-smack-path=@<:@ARG@:>@],
8 [Build with the different path to SMACK (ARG=string)]),
10 SMACK_LIBS="-L$withval/lib64 -L$withval/lib -lsmack -Wl,-rpath,$withval/lib64 -Wl,-rpath,$withval/lib"
11 SMACK_CFLAGS="-I$withval/include"
15 saved_CFLAGS="$CFLAGS"
17 LIBS="$SMACK_LIBS $LIBS"
18 CFLAGS="$SMACK_CFLAGS $CFLAGS"
20 AC_TRY_LINK([#include <smack/smack.h>],
21 [int err; struct smack_ctl *ctl = smack_init(NULL, &err);],
23 AC_DEFINE(HAVE_SMACK_SUPPORT, 1, [Define this if SMACK is installed])
34 AC_SUBST(SMACK_CFLAGS)
36 CFLAGS="$saved_CFLAGS"
37 AM_CONDITIONAL(HAVE_SMACK, [test "f$ac_have_smack" = "fyes"])