Added configure switch for disabling the command-line tool.
authorFlorian Pose <fp@igh-essen.com>
Thu, 09 Oct 2008 13:23:07 +0000
changeset 1253 8a081444a89a
parent 1252 0b411da5fd24
child 1254 c19d273a9e76
Added configure switch for disabling the command-line tool.
Makefile.am
configure.ac
--- a/Makefile.am	Thu Oct 09 09:48:59 2008 +0000
+++ b/Makefile.am	Thu Oct 09 13:23:07 2008 +0000
@@ -35,8 +35,11 @@
     devices \
     include \
     master \
-    script \
-    tool
+    script
+
+if BUILD_TOOL
+SUBDIRS += tool
+endif
 
 if ENABLE_USERLIB
 SUBDIRS += lib
--- a/configure.ac	Thu Oct 09 09:48:59 2008 +0000
+++ b/configure.ac	Thu Oct 09 13:23:07 2008 +0000
@@ -370,6 +370,28 @@
 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
 #------------------------------------------------------------------------------