From: Mike Frysinger <vapier@gentoo.org> To: kbd@lists.altlinux.org Subject: [kbd] [PATCH] add configure flag to disable tests Date: Mon, 13 Jul 2015 23:38:41 -0400 Message-ID: <1436845121-19437-1-git-send-email-vapier@gentoo.org> (raw) The tests require the check package to be installed. There is a configure test for this package (which is good), but it's unconditional (which is bad) as it means you can't even build & install kbd w/out the check package being installed. URL: https://bugs.gentoo.org/485116 Reported-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> --- Makefile.am | 5 ++++- configure.ac | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 89c7e83..f855110 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,10 @@ EXTRA_DIST = \ CREDITS \ contrib docs rc -SUBDIRS = src data po tests docs +SUBDIRS = src data po docs +if BUILD_TESTS +SUBDIRS += tests +endif kbd-$(VERSION).tar.xz: make distcheck diff --git a/configure.ac b/configure.ac index d0b462b..f659758 100644 --- a/configure.ac +++ b/configure.ac @@ -10,8 +10,21 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.9 -Wall color-tests dist-xz]) AC_CONFIG_SRCDIR([src/loadkeys.c]) AC_CONFIG_HEADERS(config.h) - -PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) +PKG_PROG_PKG_CONFIG + +AC_ARG_ENABLE(tests, + [AS_HELP_STRING([--disable-tests], [do not build tests])], + [build_tests=$enableval], [build_tests=auto]) +if test "$build_tests" != "no"; then + PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], + [build_tests="yes"], [ + if test "$build_tests" = "yes"; then + AC_MSG_ERROR([tests requested, but check package is missing]) + fi + build_tests="no" + ]) +fi +AM_CONDITIONAL(BUILD_TESTS, test "$build_tests" != "no") m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) AM_SILENT_RULES([yes]) -- 2.4.4
next reply other threads:[~2015-07-14 3:38 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-07-14 3:38 Mike Frysinger [this message] 2015-07-20 12:53 ` Alexey Gladkov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1436845121-19437-1-git-send-email-vapier@gentoo.org \ --to=vapier@gentoo.org \ --cc=kbd@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux console tools development discussion This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \ kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com public-inbox-index kbd Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.kbd AGPL code for this site: git clone https://public-inbox.org/public-inbox.git