diff options
author | Iker Pedrosa <ipedrosa@redhat.com> | 2023-09-14 12:13:21 +0200 |
---|---|---|
committer | Iker Pedrosa <ikerpedrosam@gmail.com> | 2023-09-29 09:24:01 +0200 |
commit | 163c424999a3e097c6c6da87cc9df3041b4e03f6 (patch) | |
tree | 4f4dc0c2913920e51966b560dfc3e4618a798336 | |
parent | 247a869ccdc442d39cd1d0d2a53014e3af26516c (diff) |
configure: add cmocka for unit tests
Prepare the ground for unit tests.
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7d213038..d76bde3e 100644 --- a/configure.ac +++ b/configure.ac @@ -719,6 +719,10 @@ if test "$with_skey" = "yes"; then ]])],[AC_DEFINE(SKEY_BSD_STYLE, 1, [Define to support newer BSD S/Key API])],[]) fi +PKG_CHECK_MODULES([CMOCKA], [cmocka], [have_cmocka="yes"], + [AC_MSG_WARN([libcmocka not found, cmocka tests will not be built])]) +AM_CONDITIONAL([HAVE_CMOCKA], [test x$have_cmocka = xyes]) + AC_CHECK_FUNC(fgetpwent_r, [AC_DEFINE(HAVE_FGETPWENT_R, 1, [Defined to 1 if you have the declaration of 'fgetpwent_r'])]) AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.]) @@ -762,6 +766,7 @@ AC_CONFIG_FILES([ etc/pam.d/Makefile etc/shadow-maint/Makefile shadow.spec + tests/unit/Makefile ]) AC_OUTPUT |