Regarding this:
http://mail.gnu.org/archive/html/bug-gnulib/2003-05/msg00014.html
Do you know if it'd solve the problem to make the prerequisite tests unconditional? I really hope so, because using cache variable names from other tests makes the code very fragile -- I've been burned by that too many times. Even using cache variables defined in the same file has been known to throw me :-)
I do see why that prerequisite-testing is conditional,
and agree in principle with the general goal.
However, it'd be much better if macros like AC_FUNC_LSTAT and
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK took optional `run-if-true'
and `run-if-false' arguments. Then we wouldn't need to rely on
fragile cache variable names.
Jim,
I was trying to sync CVS with these changes in GNULIB and I noticed that gl_PREREQ_LSTAT still wasn't being called in all the cases it needed to be. I've attached a patch to implement your suggestion to make the prerequisite test unconditional as well as comments to update the call when autoconf catches up. :)
Index: m4/lstat.m4 =================================================================== RCS file: /cvsroot/gnulib/gnulib/m4/lstat.m4,v retrieving revision 1.14 diff -u -r1.14 lstat.m4 --- m4/lstat.m4 31 Dec 2002 13:43:06 -0000 1.14 +++ m4/lstat.m4 20 Jul 2003 12:06:42 -0000 @@ -13,9 +13,12 @@ [ AC_FUNC_LSTAT dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat). - if test $ac_cv_func_lstat_empty_string_bug = yes; then - gl_PREREQ_LSTAT - fi + + dnl The call below is unconditional, but should really depend on + dnl [run-if-true] & [run-if-false] arguments to AC_FUNC_LSTAT & + dnl AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINKS. Unfortunately, as of + dnl version 2.57, autoconf doesn't support these arguments. + AC_REQUIRE([gl_PREREQ_LSTAT]) ])
# Prerequisites of lib/lstat.c.
Derek
-- *8^)
Email: [EMAIL PROTECTED]
Get CVS support at <http://ximbiot.com>! -- HAMLET No, not I. I never gave you aught. OPHELIA My honoured lord, you know right well you did, And with them words of so sweet breath composed As made the things more rich. Their perfume lost, Take these again. For to the noble mind Rich gifts wax poor when givers prove unkind. There, my lord.
- Hamlet, Act III, Scene 1, Lines 96-102