summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-02-12 14:47:35 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-03-08 22:19:26 +0100
commita5077712fc8c24e8cad08207b7b5a6603bde6a7c (patch)
treed935c7b7fd30d7e4476b85e6fc740f9368a41978 /src
parentb40583c6d52b72e41bf01106534535e54b4fba4f (diff)
downloadsssd-a5077712fc8c24e8cad08207b7b5a6603bde6a7c.tar.gz
sssd-a5077712fc8c24e8cad08207b7b5a6603bde6a7c.tar.bz2
sssd-a5077712fc8c24e8cad08207b7b5a6603bde6a7c.zip
Detect the presence of libcmocka during configure
Diffstat (limited to 'src')
-rw-r--r--src/external/libcmocka.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/src/external/libcmocka.m4 b/src/external/libcmocka.m4
new file mode 100644
index 00000000..c5732761
--- /dev/null
+++ b/src/external/libcmocka.m4
@@ -0,0 +1,19 @@
+dnl this file will be simplified when cmocka carries a .pc file
+AC_SUBST(CMOCKA_LIBS)
+AC_SUBST(CMOCKA_CFLAGS)
+
+AC_CHECK_HEADERS(
+ [setjmp.h cmocka.h],
+ [AC_CHECK_LIB([cmocka], [_will_return],
+ [ CMOCKA_LIBS="-lcmocka"
+ have_cmocka="yes" ],
+ [AC_MSG_WARN([No libcmocka library found])
+ have_cmocka="no" ])],
+ [AC_MSG_WARN([libcmocka header files not installed])],
+ [[ #include <stdarg.h>
+ # include <stddef.h>
+ #ifdef HAVE_SETJMP_H
+ # include <setjmp.h>
+ #endif
+ ]]
+)