autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_DEFINE whitespace


From: Eric Blake
Subject: Re: AC_DEFINE whitespace
Date: Thu, 13 Nov 2008 03:46:02 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> Found some others; including one in make-3.81 and mozilla.  You're right;
> I will have to rework the patch so that AC_DEFINE continues to provide a
> leading newline (although I'd still like to remove the wasted newline from
> other clients of AH_VERBATIM).
> 

Here's what I committed.

From: Eric Blake <address@hidden>
Date: Tue, 11 Nov 2008 10:34:08 -0700
Subject: [PATCH] Whitespace reduction in configure.

* lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid empty lines.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES):
Likewise.
(_AC_DEFINE_Q): Restore empty line, since some clients in the wild
depend on it.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog                  |    9 +++++++++
 lib/autoconf/autoheader.m4 |    5 ++---
 lib/autoconf/general.m4    |   17 ++++++++---------
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 634412a..88ea131 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-11-12  Eric Blake  <address@hidden>
 
+       Whitespace reduction in configure.
+       * lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid empty lines.
+       * lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES):
+       Likewise.
+       (_AC_DEFINE_Q): Restore empty line, since some clients in the wild
+       depend on it.
+
+2008-11-12  Eric Blake  <address@hidden>
+
        Make M4sh, not autoconf, guarantee sane $SHELL.
        * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Move setting of
        SHELL...
diff --git a/lib/autoconf/autoheader.m4 b/lib/autoconf/autoheader.m4
index 185c0e4..dfc5f77 100644
--- a/lib/autoconf/autoheader.m4
+++ b/lib/autoconf/autoheader.m4
@@ -2,7 +2,7 @@
 # Interface with autoheader.
 
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002 Free Software Foundation, Inc.
+# 2002, 2008 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -68,8 +68,7 @@ m4_define([AH_OUTPUT], [])
 # Quote for Perl '' strings, which are those used by Autoheader.
 m4_define([AH_VERBATIM],
 [AS_LITERAL_IF([$1],
-              [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))])
-])
+              [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))])])
 
 
 # AH_TEMPLATE(KEY, DESCRIPTION)
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 1e9056a..4afa794 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1333,16 +1333,16 @@ AS_ECHO(["/* confdefs.h */"]) > confdefs.h
 
 # Predefined preprocessor variables.
 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
-                  [Define to the full name of this package.])
+                  [Define to the full name of this package.])dnl
 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
-                  [Define to the one symbol short name of this package.])
+                  [Define to the one symbol short name of this package.])dnl
 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
-                  [Define to the version of this package.])
+                  [Define to the version of this package.])dnl
 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
-                  [Define to the full name and version of this package.])
+                  [Define to the full name and version of this package.])dnl
 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
                   [Define to the address where bug reports for this package
-                   should be sent.])
+                   should be sent.])dnl
 
 # Let the site file select an alternate cache file if it wants to.
 AC_SITE_LOAD
@@ -2088,8 +2088,8 @@ m4_define([_AC_DEFINE_Q],
 ], [-])])], [], [],
        [m4_warn([syntax], [AC_DEFINE]m4_ifval([$1], [], [[_UNQUOTED]])dnl
 [: `$3' is not a valid preprocessor define value])])]dnl
-[m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])])]dnl
-[_m4_popdef([AC_name])]dnl
+[m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])
+])_m4_popdef([AC_name])]dnl
 [cat >>confdefs.h <<$1_ACEOF
 address@hidden:@define] $2 m4_if([$#], 2, 1, [$3], [], [/**/], [$3])
 _ACEOF
@@ -2718,8 +2718,7 @@ m4_define([_AC_CHECK_FILES],
 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.  For files that exist, also
 # provide the preprocessor variable HAVE_FILE.
 AC_DEFUN([AC_CHECK_FILES],
-[m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[
-$2], [$3])])])
+[m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
 
 
 ## ------------------------------- ##
-- 
1.6.0.2








reply via email to

[Prev in Thread] Current Thread [Next in Thread]