40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozekdnl A macro to check presence of a cwrap wrapper on the system
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozekdnl AM_CHECK_WRAPPER(name, conditional)
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozekdnl If the cwrap library is found, sets the HAVE_$name conditional
40b2be4f4312470044cdef460b02b66003f5c85fJakub HrozekAC_DEFUN([AM_CHECK_WRAPPER],
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AC_MSG_CHECKING([for $1])
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek PKG_CHECK_EXISTS([$1],
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AC_MSG_RESULT([yes])
9d453f1e8b28983b363b44c49b7cd701a994fd97Nikolai Kondrashov AC_SUBST([$2], [yes])
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AC_MSG_RESULT([no])
9d453f1e8b28983b363b44c49b7cd701a994fd97Nikolai Kondrashov AC_SUBST([$2], [no])
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AC_MSG_WARN([cwrap library $1 not found, some tests will not run])
fd3b0d8235322ada8f3b9b83b30ce57242ebf6cdNikolai Kondrashov AM_CONDITIONAL($2, [ test x$$2 = xyes])
40b2be4f4312470044cdef460b02b66003f5c85fJakub HrozekAC_DEFUN([AM_CHECK_UID_WRAPPER],
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AM_CHECK_WRAPPER(uid_wrapper, HAVE_UID_WRAPPER)
40b2be4f4312470044cdef460b02b66003f5c85fJakub HrozekAC_DEFUN([AM_CHECK_NSS_WRAPPER],
40b2be4f4312470044cdef460b02b66003f5c85fJakub Hrozek AM_CHECK_WRAPPER(nss_wrapper, HAVE_NSS_WRAPPER)