diff options
author | Sumit Bose <sbose@redhat.com> | 2015-02-24 15:29:00 +0100 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-03-09 14:48:08 +0100 |
commit | 8c89807b112585d85c1941d3d58b546e79ea2409 (patch) | |
tree | e3b9541926a495068d1ced84ff7c139b668f2fa3 | |
parent | a695f33989c3e6159a12c9341e42c042847cd57b (diff) | |
download | freeipa-8c89807b112585d85c1941d3d58b546e79ea2409.tar.gz freeipa-8c89807b112585d85c1941d3d58b546e79ea2409.tar.xz freeipa-8c89807b112585d85c1941d3d58b546e79ea2409.zip |
Add configure check for cwrap libraries
Currently only nss-wrapper is checked, checks for other crwap libraries
can be added e.g. as
AM_CHECK_WRAPPER(uid_wrapper, HAVE_UID_WRAPPER)
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r-- | daemons/configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/daemons/configure.ac b/daemons/configure.ac index 97cd25115..7c979fe2d 100644 --- a/daemons/configure.ac +++ b/daemons/configure.ac @@ -236,6 +236,30 @@ PKG_CHECK_EXISTS(cmocka, ) AM_CONDITIONAL([HAVE_CMOCKA], [test x$have_cmocka = xyes]) +dnl A macro to check presence of a cwrap (http://cwrap.org) 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], +[ + FOUND_WRAPPER=0 + + AC_MSG_CHECKING([for $1]) + PKG_CHECK_EXISTS([$1], + [ + AC_MSG_RESULT([yes]) + FOUND_WRAPPER=1 + ], + [ + AC_MSG_RESULT([no]) + AC_MSG_WARN([cwrap library $1 not found, some tests will not run]) + ]) + + AM_CONDITIONAL($2, [ test x$FOUND_WRAPPER = x1]) +]) + +AM_CHECK_WRAPPER(nss_wrapper, HAVE_NSS_WRAPPER) + dnl -- dirsrv is needed for the extdom unit tests -- PKG_CHECK_MODULES([DIRSRV], [dirsrv >= 1.3.0]) dnl -- sss_idmap is needed by the extdom exop -- |