#----------------------------------------
# Prepare automake
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
# For releases, enable silent rules, unless the user explicitly
# disables them.
#----------------------------------------
# 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(
#----------------------------------------
# Setup automake conditional build
+AM_CONDITIONAL(
+ [COND_kconfig],
+ [test "$enable_kconfig" = "yes"])
AM_CONDITIONAL(
[COND_conf],
[test "$enable_conf" = "yes"])
[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=]
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(
[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])