From 3378685f25b34ce1f1462ee5284c2289f5a1ddc7 Mon Sep 17 00:00:00 2001 From: Matthew Fioravante Date: Fri, 18 Jan 2013 10:55:48 +0000 Subject: 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 Acked-by: Ian Campbell Committed-by: Ian Campbell --- m4/subsystem.m4 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 m4/subsystem.m4 (limited to 'm4') 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) +]) -- cgit v1.2.3