bug-gnulib
[Top][All Lists]
Advanced

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

Avoid a configure-time syntax error in gl_FUNC_ACL.


From: Jim Meyering
Subject: Avoid a configure-time syntax error in gl_FUNC_ACL.
Date: Thu, 06 Dec 2007 16:54:38 +0100

Using the latest gnulib code in coreutils, I got a configure-time
syntax error because the cache variable was not defined in the else branch.
It's very tempting to hoist the seemingly duplicate AC_CHECK_FUNCS call,
but you can't, since it to be run after the library check.
I've just pushed this change:

        Avoid a configure-time syntax error in gl_FUNC_ACL.
        * m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
        function in each branch, before testing the cache variable.

Signed-off-by: Jim Meyering <address@hidden>
---
 ChangeLog |    6 ++++++
 m4/acl.m4 |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 077a656..0b39ccc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-06  Jim Meyering  <address@hidden>
+
+       Avoid a configure-time syntax error in gl_FUNC_ACL.
+       * m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
+       function in each branch, before testing the cache variable.
+
 2007-12-04  Eric Blake  <address@hidden>

        Make scripts executable.
diff --git a/m4/acl.m4 b/m4/acl.m4
index b5a9aad..6a1951d 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -24,7 +24,8 @@ AC_DEFUN([gl_FUNC_ACL],
       [test "$ac_cv_search_acl_trivial" = "none required" ||
        LIB_ACL=$ac_cv_search_acl_trivial
        AC_CHECK_FUNCS([acl_trivial])],
-      [if test $ac_cv_func_acl_trivial != yes; then
+      [AC_CHECK_FUNCS([acl_trivial])
+       if test $ac_cv_func_acl_trivial != yes; then
         AC_SEARCH_LIBS([acl_get_file], [acl],
           [test "$ac_cv_search_acl_get_file" = "none required" ||
            LIB_ACL=$ac_cv_search_acl_get_file




reply via email to

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