diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-11-01 20:38:23 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-11-01 20:40:23 +0100 |
commit | a4bfdce8ed87d728f5644077ddbe94380c6ff3b5 (patch) | |
tree | bba77eaf4f818bbc3bced6f9ddda87cecd70f83d | |
parent | 4f5b8a1d0f927b911dadeb7a0980c38b72201c76 (diff) |
Switch from cppunit.m4 to pkgconfig (patch from Jin^Eld)
-rwxr-xr-x | autogen.sh | 10 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | test/Makefile.am | 4 |
3 files changed, 13 insertions, 12 deletions
@@ -11,15 +11,5 @@ then exit 1 fi -# Check for the existence of cppunit.m4. If missing emulate it. -mkdir -p actest -cat << EOF > actest/configure.ac -AC_INIT([actest], [1.0.0]) -AM_PATH_CPPUNIT(1.9.6) -EOF -[ -f acinclude.m4 ] && rm acinclude.m4 -autoreconf -W error actest 2>/dev/null || echo "AC_DEFUN([AM_PATH_CPPUNIT],[echo 'cppunit hack'])" > acinclude.m4 -rm -Rf actest - # Now run autoreconf ${AUTORECONF:-autoreconf} -fiv --warnings=no-unsupported diff --git a/configure.ac b/configure.ac index 7e6695c..0dcf8c0 100644 --- a/configure.ac +++ b/configure.ac @@ -142,10 +142,17 @@ AC_ARG_WITH([test], AS_HELP_STRING([--with-test], [Build unit tests])) AS_IF([test x$with_test == xyes], - [AC_MSG_WARN([*** Building unittests!]) - AM_PATH_CPPUNIT(1.9.6)] + [ + AC_MSG_WARN([*** Building unittests!]) + PKG_CHECK_MODULES([CPPUNIT], [ cppunit >= 1.9.6 ], [], + [ + AC_MSG_ERROR([$CPPUNIT_PKG_ERRORS]) + ]) + ] ) +AM_CONDITIONAL([ENABLE_TESTS], [test "x$with_test" = "xyes"]) + dnl ====================== dnl Compile LV2 plugin dnl ====================== diff --git a/test/Makefile.am b/test/Makefile.am index 2ad9a9c..1f2419e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,6 +1,8 @@ # Rules for the test code (use `make check` to execute) SUBDIRS = dgreftest +if ENABLE_TESTS + include $(top_srcdir)/src/Makefile.am.drumgizmo include $(top_srcdir)/plugingui/Makefile.am.plugingui @@ -190,3 +192,5 @@ semaphoretest_SOURCES = \ $(top_srcdir)/src/semaphore.cc \ semaphoretest.cc \ test.cc + +endif |