summaryrefslogtreecommitdiffstats
path: root/src/external/libcmocka.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/libcmocka.m4')
-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 000000000..c57327612
--- /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
+ ]]
+)