summaryrefslogtreecommitdiffstats
path: root/src/external/cwrap.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 05:31:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 05:31:45 +0000
commit74aa0bc6779af38018a03fd2cf4419fe85917904 (patch)
tree9cb0681aac9a94a49c153d5823e7a55d1513d91f /src/external/cwrap.m4
parentInitial commit. (diff)
downloadsssd-74aa0bc6779af38018a03fd2cf4419fe85917904.tar.xz
sssd-74aa0bc6779af38018a03fd2cf4419fe85917904.zip
Adding upstream version 2.9.4.upstream/2.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/external/cwrap.m4')
-rw-r--r--src/external/cwrap.m435
1 files changed, 35 insertions, 0 deletions
diff --git a/src/external/cwrap.m4 b/src/external/cwrap.m4
new file mode 100644
index 0000000..6e3487c
--- /dev/null
+++ b/src/external/cwrap.m4
@@ -0,0 +1,35 @@
+dnl A macro to check presence of a cwrap wrapper on the system
+dnl Usage:
+dnl AM_CHECK_WRAPPER(name, conditional)
+dnl If the cwrap library is found, sets the HAVE_$name conditional
+AC_DEFUN([AM_CHECK_WRAPPER],
+[
+ AC_MSG_CHECKING([for $1])
+ PKG_CHECK_EXISTS([$1],
+ [
+ AC_MSG_RESULT([yes])
+ AC_SUBST([$2], [yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_SUBST([$2], [no])
+ AC_MSG_WARN([cwrap library $1 not found, some tests will not run])
+ ])
+
+ AM_CONDITIONAL($2, [ test x$$2 = xyes])
+])
+
+AC_DEFUN([AM_CHECK_UID_WRAPPER],
+[
+ AM_CHECK_WRAPPER(uid_wrapper, HAVE_UID_WRAPPER)
+])
+
+AC_DEFUN([AM_CHECK_NSS_WRAPPER],
+[
+ AM_CHECK_WRAPPER(nss_wrapper, HAVE_NSS_WRAPPER)
+])
+
+AC_DEFUN([AM_CHECK_PAM_WRAPPER],
+[
+ AM_CHECK_WRAPPER(pam_wrapper, HAVE_PAM_WRAPPER)
+])