m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
authorJim Meyering <meyering@redhat.com>
Sun, 18 Oct 2009 16:53:35 +0000 (18:53 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 18 Oct 2009 16:53:35 +0000 (18:53 +0200)
Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
right after its initialization, rather than farther down.
Keeping these in close proximity makes it easier to ensure
that each such variable is initialized.  E.g.,

    LIB_CLOCK_GETTIME=
    AC_SUBST([LIB_CLOCK_GETTIME])

This change also increments these serial numbers.
* m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.

ChangeLog
m4/clock_time.m4
m4/euidaccess.m4
m4/nanosleep.m4

index d176b0a..b583da3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-18  Jim Meyering  <meyering@redhat.com>
+
+       m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
+       Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
+       right after its initialization, rather than farther down.
+       Keeping these in close proximity makes it easier to ensure
+       that each such variable is initialized.  E.g.,
+
+           LIB_CLOCK_GETTIME=
+           AC_SUBST([LIB_CLOCK_GETTIME])
+
+       This change also increments these serial numbers.
+       * m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
+       * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
+       * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
+
 2009-10-18  Bruno Haible  <bruno@clisp.org>
 
        Don't let environment variables perturb build.
index d67f3df..d11e106 100644 (file)
@@ -1,4 +1,4 @@
-# clock_time.m4 serial 9
+# clock_time.m4 serial 10
 dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,11 +21,11 @@ AC_DEFUN([gl_CLOCK_TIME],
   # programs in the package would end up linked with that potentially-shared
   # library, inducing unnecessary run-time overhead.
   LIB_CLOCK_GETTIME=
+  AC_SUBST([LIB_CLOCK_GETTIME])
   gl_saved_libs=$LIBS
     AC_SEARCH_LIBS([clock_gettime], [rt posix4],
                    [test "$ac_cv_search_clock_gettime" = "none required" ||
                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
-    AC_SUBST([LIB_CLOCK_GETTIME])
     AC_CHECK_FUNCS([clock_gettime clock_settime])
   LIBS=$gl_saved_libs
 ])
index 5e8adac..1f748f4 100644 (file)
@@ -1,4 +1,4 @@
-# euidaccess.m4 serial 11
+# euidaccess.m4 serial 12
 dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -43,11 +43,11 @@ AC_DEFUN([gl_PREREQ_EUIDACCESS], [
   # programs in the package would end up linked with that potentially-shared
   # library, inducing unnecessary run-time overhead.
   LIB_EACCESS=
+  AC_SUBST([LIB_EACCESS])
   gl_saved_libs=$LIBS
     AC_SEARCH_LIBS([eaccess], [gen],
                    [test "$ac_cv_search_eaccess" = "none required" ||
                     LIB_EACCESS=$ac_cv_search_eaccess])
-    AC_SUBST([LIB_EACCESS])
     AC_CHECK_FUNCS([eaccess])
   LIBS=$gl_saved_libs
 ])
index 663fedf..d991b61 100644 (file)
@@ -1,4 +1,4 @@
-# serial 27
+# serial 28
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
@@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
  LIB_NANOSLEEP=
+ AC_SUBST([LIB_NANOSLEEP])
  AC_SEARCH_LIBS([nanosleep], [rt posix4],
                 [test "$ac_cv_search_nanosleep" = "none required" ||
                  LIB_NANOSLEEP=$ac_cv_search_nanosleep])
@@ -113,7 +114,6 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
     gl_PREREQ_NANOSLEEP
   fi
 
- AC_SUBST([LIB_NANOSLEEP])
  LIBS=$nanosleep_save_libs
 ])