Mauro Tortonesi <[EMAIL PROTECTED]> writes: >> Isn't the second check a matter of running a small test program, as in >> the check that Daniel provided (but more sophisticated)? > > sure. but what was the problem with stack detection? it's simply a couple > of AC_EGREP_CPP macros after all...
The problem I have with IN6_GUESS_STACK is that it seems to rely on product information, in this case the known stack names. And those things change. So when "usagi" gets renamed to "yojimbo" or when we port Wget to a new IPv6-aware architecture, or when a new IPv6 implementation gets added to an existing architecture, we need to update our Autoconf macros. Updating the macros sucks, not only because M4 blows chunks, but also because it means that older source releases of Wget will no longer work. One of the design goals of Autoconf was to avoid the fallacy of older tools that had complex product databases that had to be maintained by hand. Instead, most Autoconf tests try to check for features. The exception are cases when such checks are not possible or feasible. This might or might not be the case here. So if it really takes too long or it's just too hard to write a check, then we'll use a version of IN6_GUESS_STACK. > i could start from: > > http://cvs.deepspace6.net/view/nc6/config/in6_guess_stack.m4?rev=HEAD&content-type=text/vnd.viewcvs-markup > > and made it much simpler (15-30 lines). what is your opinion about > it? Simplifying that code, *and* adding a fallback that handles unknown stacks in a reasonable fashion (for example by assuming minimal functionality or strict standard compliance) sounds fine to me. I'd still prefer a purely feature based check, but again, if you tell me it's hard or impossible to write one, I'll believe you. >> If the latter is the case, should be a "use ipvX only" runtime >> option as well? > > i think that -4 and -6 command line options for wget are a MUST. the > first would make wget use ipv4 only, while the second would make > wget use ipv6 only. believe me, there are plenty of cases in which > you want to use such options. I agree that those options are useful. And since Wget doesn't currently use numeric-only options, those are available.