]> git.sur5r.net Git - kconfig-frontends/blobdiff - configure.ac
buildsystem: don't use recursive make for kconfig meta frontend
[kconfig-frontends] / configure.ac
index ad923e9532b8361c0b382894abc0285886ef8361..bcd5ed2e14708834422fff09494247c45a9f736c 100644 (file)
@@ -20,7 +20,7 @@ AC_CONFIG_MACRO_DIR([scripts/.autostuff/m4])
 #----------------------------------------
 # Prepare automake
 
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
 
 # For releases, enable silent rules, unless the user explicitly
 # disables them.
@@ -122,6 +122,13 @@ AC_SUBST([enable_L10n], [${enable_L10n:-yes}])
 #----------------------------------------
 # Options to selectively enable/disable frontends
 # All are selected by default
+AC_ARG_ENABLE(
+    [kconfig],
+    [AS_HELP_STRING(
+        [--disable-kconfig],
+        [kconfig, the meta-frontend to all kconfig tools (default=yes)])])
+AC_SUBST([enable_kconfig], [${enable_kconfig:-yes}])
+
 AC_ARG_ENABLE(
     [conf],
     [AS_HELP_STRING(
@@ -426,6 +433,9 @@ AS_IF(
 
 #----------------------------------------
 # Setup automake conditional build
+AM_CONDITIONAL(
+    [COND_kconfig],
+    [test "$enable_kconfig" = "yes"])
 AM_CONDITIONAL(
     [COND_conf],
     [test "$enable_conf" = "yes"])
@@ -460,26 +470,6 @@ AC_SUBST(
     [KCONFIGPARSER_LIB_VERSION],
     [m4_esyscmd_s([./scripts/version.sh --plain])])
 
-#----------------------------------------
-# Finalise
-AC_CONFIG_FILES([
-    Makefile
-    docs/Makefile
-    libs/Makefile
-    libs/images/Makefile
-    libs/lxdialog/Makefile
-    libs/parser/Makefile
-    frontends/Makefile
-    frontends/conf/Makefile
-    frontends/mconf/Makefile
-    frontends/nconf/Makefile
-    frontends/gconf/Makefile
-    frontends/qconf/Makefile
-    utils/Makefile
-    scripts/Makefile
-])
-AC_OUTPUT
-
 #----------------------------------------
 # Pretty-print the configuration settings
 [fe_list=]
@@ -488,6 +478,15 @@ AS_IF([test "$enable_gconf" = "yes"], [fe_list="$fe_list gconf"])
 AS_IF([test "$enable_mconf" = "yes"], [fe_list="$fe_list mconf"])
 AS_IF([test "$enable_nconf" = "yes"], [fe_list="$fe_list nconf"])
 AS_IF([test "$enable_qconf" = "yes"], [fe_list="$fe_list qconf"])
+# The meta frontend is handled separatly, below, because we do not
+# want it in the list of tools, kcfg_list.
+
+[kcfg_list="$fe_list"]
+AS_IF([test "$enable_utils" = "yes"], [kcfg_list="$kcfg_list diff merge tweak"])
+AS_IF([test "$has_gettext" = "yes"],  [kcfg_list="$kcfg_list gettext"])
+AC_SUBST([kcfg_list], [${kcfg_list}])
+
+AS_IF([test "$enable_kconfig" = "yes"], [fe_list=" kconfig$fe_list"])
 
 [lib_list=]
 AS_IF(
@@ -497,6 +496,23 @@ AS_IF(
     [test "$enable_static" = "yes"],
     [lib_list="$lib_list${lib_list:+,} static"])
 
+#----------------------------------------
+# Finalise
+AC_CONFIG_FILES([
+    Makefile
+    libs/Makefile
+    libs/images/Makefile
+    libs/lxdialog/Makefile
+    libs/parser/Makefile
+    frontends/Makefile
+    frontends/conf/Makefile
+    frontends/mconf/Makefile
+    frontends/nconf/Makefile
+    frontends/gconf/Makefile
+    frontends/qconf/Makefile
+])
+AC_OUTPUT
+
 AC_MSG_NOTICE()
 AC_MSG_NOTICE([Configured with:])
 AC_MSG_NOTICE([- parser library     :$lib_list])