Re: New autoconf macro

David Kastrup <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
Jan-Ake Larsson <[email protected]> writes:

> David Kastrup wrote:
>> Jan-Ake Larsson <[email protected]> writes:
>> 
>> > I presume you mean
>> >
>> > David Kastrup wrote:
>> >> If I am correct in that assumption, we should be able to get rid of
>> >> not only AC_FULL_EXPAND.
>> >  _________/\__________________
>> > /                             \
>> > all _expand variables but also
>> 
>> No, we actually currently have stuff like options set to the _string_
>> '${prefix}/whatever', with ${prefix} later getting expanded in the
>> Makefile (either by make or the shell, forgot which). 
>
> By make.
>
>> And not even this weirdness will be needed anymore if I am correct.
>> The current idea of lispdir-relative settings coupled with DESTDIR
>> should be all we need.  No late expansion of shell variables
>> anymore.  It can all be done at configure time.  This means, of
>> course, that
>> 
>>   make prefix=somethingelse
>> 
>> will _not_ work anymore, since most variables will not be
>> prefix-relative.  But I don't think this is a problem, is it?
>
> It is not so wierd, most of autoconf's defaults are like that. They
> get expanded by make and are actually mostly the reason why
>
>  make prefix=foo 
>
> works. So I would expect it to _start_ working rather than the
> opposite.

Not sure about that.

> A few questions:
>
> 1) A while ago I introduced a fix for a CVS mishap in
>    EMACS_EXAMINE_PACKAGEDIR checking for an extra auctex subdirectory.
>    The fix has been in place a year and a half. No release was made
>    with the erroneous autoconf code, but a few has been made
>    containing the fix. Perhaps I can remove it now?

I suppose so.  No idea what this was about, anyway.

> 2) All the line continuation backslashes in EMACS_EXAMINE_PACKAGEDIR
>    seem unnecessary, EMACS_TEST_LISPDIR makes do without them.

Probably yes.

> 3) AC_FULL_EXPAND is performed on arguments to --with-texmf-dir, for
>    the purpose of doing only test -d ${withval}, I am unsure of the
>    reason for this? I mean, shell variables would be expanded as
>    needed there.

No.  If we have  --with-texmf-dir='${prefix}/something' then the $ was
preserved in the variables until make time.  At least that was the
idea.  But when we have DESTDIR, we won't need to preserve the
${prefix} for as long as that if I am not mistaken.

> It is also used in EMACS_TEST_LISPDIR, but there I think we can just
> amend the lisp code, or trust shell expansion.  Neither of these do
> shell escaping, there are double quotes in effect.

If we have "$somevar", and somevar='${someother}', then we only get
one level of expansion.

> 4) Why is $3 "there for historical reasons" in EMACS_LISP, the macro
> is internal to our code?

Good question.

> I take it that $5 and $6 are used to avoid some extra quoting
> business, is this true?

Yes.  They mean that we can pass a shell-variable verbatim into Emacs,
no expansion, no quoting, no Lisp string syntax, no other stupidities.
Essential for dealing with backslashes in file names and similar
idiocies with which we are inflicted.

If you want to work on the stuff, feel free to do so.  I am currently
still entangled with UTF-8 and other business.  I have just noticed to
my severe indignation that my system has LC_CTYPE set to C under X,
which is intolerable.  I suspect fluxbox (which I recently switched
to), but have yet to find the culprit.  It already mangled the
telephone book of my mobile with a bad conversion.

So I'll be still busy at least today with other junk.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.