summaryrefslogtreecommitdiff
path: root/src/external
diff options
context:
space:
mode:
Diffstat (limited to 'src/external')
-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
+ ]]
+)