#----------------------------------------
# Prepare automake
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
# For releases, enable silent rules, unless the user explicitly
# disables them.
[AM_SILENT_RULES],
[AM_SILENT_RULES([yes])])
-AS_IF(
- [test $AM_DEFAULT_VERBOSITY -eq 0],
- [SILENT_MAKEFLAGS="--no-print-directory -s"],
- [SILENT_MAKEFLAGS=""])
-AC_SUBST([SILENT_MAKEFLAGS])
-
#----------------------------------------
# Prepare libtool
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Automake, we have a problem...
#----------------------------------------
# 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"])
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(
#----------------------------------------
# Finalise
+# All generated files are generated by a Makefile rule, except Makefile
+# itself of course.
+# There is no generic solution in automake to generate a file from its
+# .in source, so we'd have to provide custom, hand-made rules, which is
+# not nice. So, we handle libs/parser/kconfig-parser.pc here.
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
+ libs/parser/kconfig-parser.pc
])
AC_OUTPUT