From: Jim Meyering Date: Sun, 18 Oct 2009 16:53:35 +0000 (+0200) Subject: m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization X-Git-Tag: v0.1~5305 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=6cb63a9700e8b21e1ad765b0a8e6cfccc9c162ea;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index d176b0a8a..b583da3a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2009-10-18 Jim Meyering + + 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 Don't let environment variables perturb build. diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 index d67f3df56..d11e106c2 100644 --- a/m4/clock_time.m4 +++ b/m4/clock_time.m4 @@ -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 ]) diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index 5e8adace3..1f748f401 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -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 ]) diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index 663fedf12..d991b6121 100644 --- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -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 ])