From 478448dd68c1b2686ad4b6b60affcfe631287595 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Thu, 9 Oct 2008 13:23:07 +0000 Subject: [PATCH] Added configure switch for disabling the command-line tool. --- Makefile.am | 7 +++++-- configure.ac | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index af4c9e23..296ac1dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,8 +35,11 @@ SUBDIRS = \ devices \ include \ master \ - script \ - tool + script + +if BUILD_TOOL +SUBDIRS += tool +endif if ENABLE_USERLIB SUBDIRS += lib diff --git a/configure.ac b/configure.ac index f2397a14..1abcd3a5 100644 --- a/configure.ac +++ b/configure.ac @@ -369,6 +369,28 @@ if test "x${cycles}" = "x1"; then AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter]) fi +#------------------------------------------------------------------------------ +# Command-line tool +#----------------------------------------------------------------------------- + +AC_ARG_ENABLE([tool], + AS_HELP_STRING([--enable-tool], + [Build command-line tool (default: yes)]), + [ + case "${enableval}" in + yes) tool=1 + ;; + no) tool=0 + ;; + *) AC_MSG_ERROR([Invalid value for --enable-tool]) + ;; + esac + ], + [tool=1] +) + +AM_CONDITIONAL(BUILD_TOOL, test "x$tool" = "x1") + #------------------------------------------------------------------------------ # Userspace library generation #------------------------------------------------------------------------------