Commit 0a94cae15bae7cecb725e78e485708694d347612 added useful
headings to parts of the configure script.  This refactors
the code by adding a common macro (‘HEADING’), and also changes
the output so it's clearer at a glance:

  --- Checking for Haskell ---
  checking for ghc... (cached) ghc

  --- Checking for PHP ---
  checking for php... (cached) php
  checking for phpize... (cached) phpize
---
 configure.ac | 74 +++++++++++++++++++++++-------------------------------------
 1 file changed, 28 insertions(+), 46 deletions(-)

diff --git a/configure.ac b/configure.ac
index de247a36d..e4b6556c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,11 @@ m4_define([libguestfs_release], [21])
 
 AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release)
 
+# Headings within the configure script output.
+m4_define([HEADING],
+          [AS_ECHO
+           AS_ECHO(["--- $1 ---"])])
+
 AC_CONFIG_AUX_DIR([build-aux])
 AC_REQUIRE_AUX_FILE([guestfs-test-driver])
 
@@ -76,15 +81,13 @@ 
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_FULL],["$PACKAGE_VERSION_FULL"],[Full versio
 AC_SUBST([PACKAGE_VERSION_FULL])
 
 dnl Early gnulib initialization.
-AS_ECHO
-AS_ECHO(["Configuring Gnulib:"])
+HEADING([Configuring Gnulib])
 gl_EARLY
 gl_INIT
 
 dnl Check for external programs required to either build or run
 dnl libguestfs.
-AS_ECHO
-AS_ECHO(["Checking for external programs:"])
+HEADING([Checking for external programs])
 m4_include([m4/guestfs_progs.m4])
 
 dnl Find the release date for this version.  This is used in
@@ -103,83 +106,63 @@ AS_IF([test "x$RELEASE_DATE" != "x"],[
 AC_SUBST([RELEASE_DATE])
 
 dnl The C compiler environment.
-AS_ECHO
-AS_ECHO(["Checking for the C compiler environment:"])
+HEADING([Checking for the C compiler environment])
 m4_include([m4/guestfs_c.m4])
 
 dnl Any C libraries required by the libguestfs C library (not the daemon).
-AS_ECHO
-AS_ECHO(["Checking for libraries used by libguestfs:"])
+HEADING([Checking for libraries used by libguestfs])
 m4_include([m4/guestfs_libraries.m4])
 
 dnl Check for FUSE.
-AS_ECHO
-AS_ECHO(["Checking for FUSE:"])
+HEADING([Checking for FUSE])
 m4_include([m4/guestfs_fuse.m4])
 
 dnl The daemon and any dependencies.
-AS_ECHO
-AS_ECHO(["Checking the daemon and its dependencies:"])
+HEADING([Checking the daemon and its dependencies])
 m4_include([m4/guestfs_daemon.m4])
 
 dnl The appliance and any dependencies.
-AS_ECHO
-AS_ECHO(["Checking the appliance and its dependencies:"])
+HEADING([Checking the appliance and its dependencies])
 m4_include([m4/guestfs_appliance.m4])
 
 dnl Check for QEMU.
-AS_ECHO
-AS_ECHO(["Checking for QEMU:"])
+HEADING([Checking for QEMU])
 m4_include([m4/guestfs_qemu.m4])
 
 dnl Miscellaneous libraries used by other programs.
-AS_ECHO
-AS_ECHO(["Checking for other libraries:"])
+HEADING([Checking for other libraries])
 m4_include([m4/guestfs_misc_libraries.m4])
 
 dnl Check for language bindings.
-AS_ECHO
-AS_ECHO(["Checking for OCaml:"])
+HEADING([Checking for OCaml])
 m4_include([m4/guestfs_ocaml.m4])
-AS_ECHO
-AS_ECHO(["Checking for Perl:"])
+HEADING([Checking for Perl])
 m4_include([m4/guestfs_perl.m4])
-AS_ECHO
-AS_ECHO(["Checking for Python:"])
+HEADING([Checking for Python])
 m4_include([m4/guestfs_python.m4])
-AS_ECHO
-AS_ECHO(["Checking for Ruby:"])
+HEADING([Checking for Ruby])
 m4_include([m4/guestfs_ruby.m4])
-AS_ECHO
-AS_ECHO(["Checking for Java:"])
+HEADING([Checking for Java])
 m4_include([m4/guestfs_java.m4])
-AS_ECHO
-AS_ECHO(["Checking for Haskell:"])
+HEADING([Checking for Haskell])
 m4_include([m4/guestfs_haskell.m4])
-AS_ECHO
-AS_ECHO(["Checking for PHP:"])
+HEADING([Checking for PHP])
 m4_include([m4/guestfs_php.m4])
-AS_ECHO
-AS_ECHO(["Checking for Erlang:"])
+HEADING([Checking for Erlang])
 m4_include([m4/guestfs_erlang.m4])
-AS_ECHO
-AS_ECHO(["Checking for Lua:"])
+HEADING([Checking for Lua])
 m4_include([m4/guestfs_lua.m4])
-AS_ECHO
-AS_ECHO(["Checking for Go:"])
+HEADING([Checking for Go])
 m4_include([m4/guestfs_golang.m4])
-AS_ECHO
-AS_ECHO(["Checking for GObject Introspection:"])
+HEADING([Checking for GObject Introspection])
 m4_include([m4/guestfs_gobject.m4])
 
 dnl Bash completion.
-AS_ECHO
-AS_ECHO(["Checking for bash completion:"])
+HEADING([Checking for bash completion])
 m4_include([m4/guestfs_bash_completion.m4])
 
 dnl Miscellaneous configuration that doesn't fit anywhere else.
-AS_ECHO
-AS_ECHO(["Performing additional configuration:"])
+HEADING([Performing additional configuration])
 m4_include([m4/guestfs_misc.m4])
 
 dnl Work around autoconf's lack of expanded variables.
@@ -189,8 +172,7 @@ SYSCONFDIR="${my_sysconfdir}"
 AC_SUBST(SYSCONFDIR)
 
 dnl Produce output files.
-AS_ECHO
-AS_ECHO(["Generating output files:"])
+HEADING([Generating output files])
 
 AC_CONFIG_HEADERS([config.h])
 
-- 
2.13.1

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to