]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: add option to select frontends
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue, 17 Jan 2012 22:34:33 +0000 (23:34 +0100)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue, 17 Jan 2012 22:34:33 +0000 (23:34 +0100)
Add a ./configure option to select which frontends to install.
By default, all are installed.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
configure.ac
frontends/Makefile.am

index 3e522abdaeedaa68db17917d749d727916b8d77f..6c8eb312d335f01b94ef9ca9fd05d85362b987b2 100644 (file)
@@ -39,6 +39,28 @@ AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
 # End of the autoscan-detected stuff
 #---------------------------------------------------------------------------
 
+#----------------------------------------
+# Options to selectively enable/disable frontends
+# All are selected by default
+AC_ARG_ENABLE(
+    [conf],
+    [AS_HELP_STRING(
+        [--enable-conf],
+        [conf, the stdin-based frontend (default=yes)])])
+AC_SUBST([enable_conf], [${enable_conf:-yes}])
+AC_ARG_ENABLE(
+    [mconf],
+    [AS_HELP_STRING(
+        [--enable-mconf],
+        [mconf, the traditional ncurses-based frontend (default=yes)])])
+AC_SUBST([enable_mconf], [${enable_mconf:-yes}])
+AC_ARG_ENABLE(
+    [nconf],
+    [AS_HELP_STRING(
+        [--enable-nconf],
+        [nconf, the modern ncurses-based frontend (default=yes)])])
+AC_SUBST([enable_nconf], [${enable_nconf:-yes}])
+
 #----------------------------------------
 # Some program checks
 AC_PROG_RANLIB
@@ -89,6 +111,15 @@ AS_IF(
 # Prepare automake
 AM_INIT_AUTOMAKE
 AM_PROG_CC_C_O
+AM_CONDITIONAL(
+    [COND_conf],
+    [test "$enable_conf" = "yes"])
+AM_CONDITIONAL(
+    [COND_mconf],
+    [test "$enable_mconf" = "yes"])
+AM_CONDITIONAL(
+    [COND_nconf],
+    [test "$enable_nconf" = "yes"])
 
 #----------------------------------------
 # Finalise
index ef66433299b0719b6f8d869ad6d4323323f495c6..a1121fe786946be86e25bce1dcd13df7fe5205ed 100644 (file)
@@ -1 +1,10 @@
-SUBDIRS = conf mconf nconf
+if COND_conf
+    MAYBE_conf = conf
+endif
+if COND_mconf
+    MAYBE_mconf = mconf
+endif
+if COND_nconf
+    MAYBE_nconf = nconf
+endif
+SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf)