summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-03-13 10:28:15 +0100
committerDavid Tardon <dtardon@redhat.com>2016-03-13 15:15:05 +0100
commiteaa9b5611163ad80ffd517e028b4d4dae804464e (patch)
tree0aa2ce0c652669c6a6faf555052f1adcd405d078 /configure.ac
parent675646f42ffedba4c7827c050d40a46ab6b10caf (diff)
add unit test support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0ff3164..da9f487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,6 +236,21 @@ AS_IF([test "x$enable_static_tools" = "xyes"], [
])
AM_CONDITIONAL(STATIC_TOOLS, [test "x$enable_static_tools" = "xyes"])
+# ==========
+# Unit tests
+# ==========
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests], [Build and run unit tests])],
+ [enable_tests="$enableval"],
+ [enable_tests=yes]
+)
+AS_IF([test "x$enable_tests" = "xyes"], [
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit])
+], [])
+AC_SUBST([CPPUNIT_CFLAGS])
+AC_SUBST([CPPUNIT_LIBS])
+AM_CONDITIONAL(WITH_TESTS, [test "x$enable_tests" = "xyes"])
+
# =============
# Documentation
# =============
@@ -283,6 +298,7 @@ src/conv/text/Makefile
src/conv/text/sw6022text.rc
src/lib/Makefile
src/lib/libsw602.rc
+src/test/Makefile
build/Makefile
build/win32/Makefile
docs/Makefile