bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] Re: getline AC_LIBOBJs


From: Derek Robert Price
Subject: [Bug-gnulib] Re: getline AC_LIBOBJs
Date: Thu, 23 Oct 2003 18:03:45 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Eggert wrote:

|I installed this more-conservative-but-uglier patch instead.


Your patch will work fine for me and I actually think it is more elegant
than my solution - I just didn't think to generalize it so far for this
one case, but I do have a few questions and comments -

|Unfortunately that patch would break coreutils, since the
|AC_REQUIRE([gl_GETNDELIM2]) in coreutils would have no effect if
|AM_FUNC_GETLINE were modified to conditionally invoke gl_GETNDELIM2,
|andd hence coreutils wouldn't work on hosts that have getline but lack
|getndelim2.


I didn't think it did.  I just made the entrance point to getndelim2
gl_GETNDELIM2 rather than having AM_FUNC_GETLINE call AC_LIBOBJ & then
gl_PREREQ_GETNDELIM2 itself.   Then I made gl_GETNDELIM2 responsible for
knowing if it had been invoked before (via a shell variable so only the
first inclusion actually reached in the configure script would actually
run).

Your solution works anyhow and I like the generalness of checking the
contents of the $LIBOBJ variable, but the same code is duplicated in two
locations unnecessarily.

|Maybe this is a symptom of a more general problem?  Should coreutils
|be saying just "gl_FOO" rather than AC_REQUIRE([gl_FOO])?  (I wish
|these dependency issues weren't so confusing!)


This is what I was saying.  It seems to me, especially when a macro is
responsible for AC_LIBOBJing itself, that it makes sense to have just
one call that includes everything necessary -

~    gl_GETNDELIM2

rather than

~    AC_LIBOBJ(getndelim2)
~    gl_PREREQ_GETNDELIM2

or whatever else might be necessary, especially when the contents of the
former is exactly the latter.

Regardless, again, your solution works for me, I just think having a
single entrance point for gl_GETNDELIM2 (and other macros) makes much
more sense from the viewpoint of maintainability.  For example, if this
model had been in use and this exact issue had arisen, it would only
have been necessary to apply a fix to m4/getndelim.m4.

Derek

- --
~                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
- --
This sentance has threee errors.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQE/mFBALD1OTBfyMaQRAuUxAKCiTFvU6+qS1OYz8gRS7NzyYZ5s4gCgkH8i
th1EYDbzEaR8WHiE7TYoIIs=
=cWuM
-----END PGP SIGNATURE-----






reply via email to

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