diff --git a/configure.ac b/configure.ac index 72bb74d..23e787a 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,7 @@ AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug output]),[en AC_MSG_CHECKING(for debug flag) AC_MSG_RESULT($enable_debug) +AM_CONDITIONAL([WITH_DEBUG], [test "$enable_debug" != "no"]) if test x"$enable_debug" = "xyes" then diff --git a/test/Makefile.am b/test/Makefile.am index e553971..cb56737 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,10 +7,16 @@ if WITH_CUTTER TESTS = run-test.sh TESTS_ENVIRONMENT = NO_MAKE=yes CUTTER="$(CUTTER)" -noinst_LTLIBRARIES = \ - test_access_storm.la \ - test_register_access.la \ - test_register_endianness.la +cutter_unit_test_libs = \ + test_access_storm.la \ + test_register_access.la \ + test_register_endianness.la + +if WITH_DEBUG +noinst_LTLIBRARIES = $(cutter_unit_test_libs) +else +check_LTLIBRARIES = $(cutter_unit_test_libs) +endif AM_LDFLAGS = -module -rpath $(libdir) -avoid-version -no-undefined