aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorMatthew Fioravante <matthew.fioravante@jhuapl.edu>2013-01-18 10:55:48 +0000
committerMatthew Fioravante <matthew.fioravante@jhuapl.edu>2013-01-18 10:55:48 +0000
commit3378685f25b34ce1f1462ee5284c2289f5a1ddc7 (patch)
treead1304ca60dbc3bf55122b94993d2889cb498bbe /m4
parent92c84d8429a244ef94bddd36f32667b5236be5e1 (diff)
downloadxen-3378685f25b34ce1f1462ee5284c2289f5a1ddc7.tar.gz
xen-3378685f25b34ce1f1462ee5284c2289f5a1ddc7.tar.bz2
xen-3378685f25b34ce1f1462ee5284c2289f5a1ddc7.zip
Add conditional build of subsystems to configure.ac
The toplevel Makefile still works without running configure and will default build everything Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/subsystem.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/m4/subsystem.m4 b/m4/subsystem.m4
new file mode 100644
index 0000000000..d3eb8c96f8
--- /dev/null
+++ b/m4/subsystem.m4
@@ -0,0 +1,32 @@
+AC_DEFUN([AX_SUBSYSTEM_DEFAULT_ENABLE], [
+AC_ARG_ENABLE([$1],
+AS_HELP_STRING([--disable-$1], [Disable build and install of $1]),[
+$1=n
+],[
+$1=y
+SUBSYSTEMS="$SUBSYSTEMS $1"
+AS_IF([test -e "$1/configure"], [
+AC_CONFIG_SUBDIRS([$1])
+])
+])
+AC_SUBST($1)
+])
+
+AC_DEFUN([AX_SUBSYSTEM_DEFAULT_DISABLE], [
+AC_ARG_ENABLE([$1],
+AS_HELP_STRING([--enable-$1], [Enable build and install of $1]),[
+$1=y
+SUBSYSTEMS="$SUBSYSTEMS $1"
+AS_IF([test -e "$1/configure"], [
+AC_CONFIG_SUBDIRS([$1])
+])
+],[
+$1=n
+])
+AC_SUBST($1)
+])
+
+
+AC_DEFUN([AX_SUBSYSTEM_FINISH], [
+AC_SUBST(SUBSYSTEMS)
+])