From b95becf1382a6e194b7b4e867a4f808440ad0ff9 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 7 Sep 2017 20:46:52 +0200 Subject: [PATCH] Add an --enable-install-tests option to configure. This will enable the installation of the test binaries when running make install. This feature is intended to make continuous integration easier. --- configure.ac | 9 +++++++++ test/Makefile.am | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 8c27a42d..d2d7c8c7 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,15 @@ AS_IF([test "x$enable_utcp_debug" = "xyes"], ] ); +dnl Install test binaries +AC_ARG_ENABLE([install_tests], + [AS_HELP_STRING([--enable-install-tests], [include test binaries in installation])], + [AS_IF([test "x$enable_install_tests" = "xyes"], [install_tests=true], [install_tests=false])], + [install_tests=false] +) + +AM_CONDITIONAL(INSTALL_TESTS, test "$install_tests" = true) + dnl Checks for header files. dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies. diff --git a/test/Makefile.am b/test/Makefile.am index 596c4223..27d88aeb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -25,6 +25,10 @@ check_PROGRAMS = \ sign-verify \ echo-fork +if INSTALL_TESTS +bin_PROGRAMS = $(check_PROGRAMS) +endif + basic_SOURCES = basic.c basic_LDADD = ../src/libmeshlink.la -- 2.39.2