diff options
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | libck-connector/Makefile.am | 2 | ||||
-rw-r--r-- | pam-ck-connector/Makefile.am | 6 | ||||
-rw-r--r-- | src/Makefile.am | 8 |
4 files changed, 31 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index f8d8396..806b8e3 100644 --- a/configure.ac +++ b/configure.ac @@ -391,6 +391,16 @@ if test "x$enable_rbac_shutdown" != "xno"; then fi AC_SUBST(RBAC_LIBS) +# +# Enable Tests +# +AC_ARG_ENABLE(tests, + [AS_HELP_STRING([--enable-tests],[enable validation test framework @<:@default=@<:@disabled@:>@@:>@])], + enable_tests=yes, enable_tests=no) +AC_MSG_CHECKING([whether to build the validation test framework]) +AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes") +AC_MSG_RESULT($enable_tests) + dnl --------------------------------------------------------------------------- dnl Finish dnl --------------------------------------------------------------------------- @@ -437,17 +447,22 @@ fi # Enable Debug # AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug],[turn on debugging])], + [AS_HELP_STRING([--enable-debug@<:@=no|yes|full@:>@],[change debugging level @<:@default=@<:@yes@:>@@:>@])], , enable_debug=yes) +AC_MSG_CHECKING([whether to enable debugging]) if test "$enable_debug" = "yes"; then DEBUG_CFLAGS="-DG_ENABLE_DEBUG" + AC_MSG_RESULT(yes) else if test "x$enable_debug" = "xno"; then DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" + AC_MSG_RESULT(no) elif test "$enable_debug" = "full"; then DEBUG_CFLAGS="-DG_ENABLE_DEBUG -DCONSOLEKIT_DEBUGGING" + AC_MSG_RESULT(yes) else DEBUG_CFLAGS= + AC_MSG_RESULT(yes) fi fi AC_SUBST(DEBUG_CFLAGS) @@ -528,6 +543,7 @@ echo " compiler: ${CC} cflags: ${CFLAGS} debug cflags: ${DEBUG_CFLAGS} + build tests: ${enable_tests} Base libs: ${CONSOLE_KIT_LIBS} Tools libs: ${TOOLS_LIBS} Maintainer mode: ${USE_MAINTAINER_MODE} diff --git a/libck-connector/Makefile.am b/libck-connector/Makefile.am index b04dfa1..9a8c0a8 100644 --- a/libck-connector/Makefile.am +++ b/libck-connector/Makefile.am @@ -21,6 +21,7 @@ libck_connector_la_SOURCES = \ ck-connector.h \ $(NULL) +if BUILD_TESTS noinst_PROGRAMS = \ test-connector \ $(NULL) @@ -34,6 +35,7 @@ test_connector_LDADD = \ libck-connector.la \ $(LIBDBUS_LIBS) \ $(NULL) +endif # BUILD_TESTS # soname management for libck-connector LIBCKCON_LT_CURRENT=0 diff --git a/pam-ck-connector/Makefile.am b/pam-ck-connector/Makefile.am index d0b1117..6d4f34a 100644 --- a/pam-ck-connector/Makefile.am +++ b/pam-ck-connector/Makefile.am @@ -23,6 +23,7 @@ pam_ck_connector_la_LIBADD = \ man_MANS = pam_ck_connector.8 +if BUILD_TESTS if HAVE_LINUXPAM noinst_PROGRAMS = \ test-pam \ @@ -36,9 +37,10 @@ test_pam_LDADD = \ $(PAM_LIBS) \ -lpam_misc \ $(NULL) -endif +endif # HAVE_LINUXPAM +endif # BUILD_TESTS -endif +endif # ENABLE_PAM_MODULE MAINTAINERCLEANFILES = \ *~ \ diff --git a/src/Makefile.am b/src/Makefile.am index 009bd96..f99079a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,6 +181,8 @@ console_kit_daemon_LDADD = \ libck-event-log.la \ $(NULL) +if BUILD_TESTS + noinst_PROGRAMS = \ test-event-logger \ test-tty-idle-monitor \ @@ -339,11 +341,16 @@ test_session_leader_LDADD = \ libck.la \ $(NULL) +endif # BUILD_TESTS EXTRA_DIST = \ ck-marshal.list \ $(dbusif_DATA) \ valgrind.sh \ + $(NULL) + +if BUILD_TESTS +EXTRA_DIST += \ test-open-session \ test-open-session-with-parameters \ test-session \ @@ -352,6 +359,7 @@ EXTRA_DIST = \ test-manager \ ck-collect-session-info \ $(NULL) +endif # BUILD_TESTS CLEANFILES = $(BUILT_SOURCES) |