On Saturday 14 March 2009, Michael Sperber wrote:
Ville Skyttä <scop(a)xemacs.org> writes:
> I'm not quite following why it should be testing whether it expands to
> the default - INFODIR_USER_DEFINED sounds to me like "did the user define
> it?".
That's right. The problem is that configure doesn't tell me (to my
knowledge) whether the user did define it, or whether configure is just
telling you the default.
I think it's safe enough to assume that if infodir is ${datarootdir}/info
(note: literal, _unexpanded_, do *not* check /usr/share/info
or /usr/local/share/info) by the time we examine its value, it was not set by
the user. Or even more generally, if its value contains a $, it was not set
by the user.
Now, the configure script tries to figure out whether the user did
define it by looking at the symptoms - namely if he set something other
than the problem. Now, what you did just happens to be the default:
./configure --prefix=/usr --infodir=/usr/share/info
I.e. by the time out code in configure.ac ends up looking at $infodir,
it looks the same as if you hadn't set it.
Yes, and this is why I think looking at the expanded value is fundamentally
flawed approach for what I understand the purpose of the code in configure.ac
is.
Thus, changing the "default"
configure.ac assumes would fix it for you but break it for everybody
else.
I'm afraid I don't follow you here. I'm not trying to change any defaults
here. See above and my previous mail - the key thing to understand in my
proposal is checking for the _unexpanded_ default values.
By the way, configure.ac already has the defaults mixed up, although it will
probably trigger quite rarely. configure has infodir='${datarootdir}/info'
but configure.ac (and thus configure) tests ${prefix_expanded}/share/info to
see if infodir is set to the default value. It should test for
${datarootdir_expanded}/info instead. But this wouldn't be useful for
solving the problem I have, see above for a IMO better way (checking
unexpanded values) to fix it.
I was banging my head against it at the time, and still don't
know a
satisfactory solution. Maybe we should install into
/usr/share/info/xemacs-<VERSION> but directly into /usr/share/info, just
like everybody else.
I think there's a bunch of things in configure.ac that should just go away.
We use autoconf, so we should really just use it and not fight against how it
works without a very good reason. And in the places we want to kludge around
its usual behavior, the wanted behavior and the reason for it needs to be
documented. I could spend some time trying to clean things up but without
documentation why the kludges exist, doing so would lead to "bikeshed
discussions".
BTW I still don't see value in the *_USER_DEFINED logic. Just use values from
autoconf no matter how they were set, and adapt built in path lookup code for
various dirs to use it _and_ additionally do internal lookup wherever needed
would sound like a saner approach to me.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta