--- Begin Message ---
Subject: |
Re: Small fix to configure.in in CVS |
Date: |
Thu, 26 Oct 2006 17:54:52 +0100 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.2-cvs) |
Yidong Chong <address@hidden> wrote:
>> Fixes current CVS configure.in to refer to the right variable when
>> doing the scary macro undefining stuff.
>
> Could you explain in greater detail what the problem in the existing
> configure.in is, and how your change fixes it?
Sure.
The problem I had was that I was building to a prefix directory that
included the word 'linux'. The emacs configure was preprocessing the
Makefile through the C preprocessor, and this was substituting 'linux'
to 1, thus making all the paths invalid.
I then found this code which caters for this problem by attemping to
undefine any words found in paths etc by passing -U to the
preprocessor. This wasn't working for me though, and I tracked it down
to the top_srcdir. Looking through the generated configure script (as
it exists in CVS) I could see there was no variable top_srcdir, but it
did exist as ac_top_srcdir. I guess it depeneds on the version of
autoconf used to generate the configure script, because more recent
versions prefix ac_ onto vars. If emacs doesn't have a minimum
autoconf version then maybe a better fix would be to include both
top_srcdir and ac_top_srcdir.
Needless to say, after the change -Ulinux was passed to the
preprocessor, the makefile output was correct, and emacs built and
worked. :)
Cheers,
Martin.
>> - --- emacs/configure.in~ 2006-09-28 06:47:26.000000000 +0100
>> +++ emacs/configure.in 2006-10-25 13:50:29.000000000 +0100
>> @@ -3230,7 +3230,7 @@
>> # the C preprocessor to some helpful value like 1, or maybe the empty
>> # string. Needless to say consequent macro substitutions are less
>> # than conducive to the makefile finding the correct directory.
>> - -[undefs="`echo $top_srcdir $configuration $canonical |
>> +[undefs="`echo $ac_top_srcdir $configuration $canonical |
>> sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
>> -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
>> `"]
>
--- End Message ---