bug-gnu-utils
[Top][All Lists]
Advanced

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

srcdir detection (was: Re: gettext 0.14.5 compile issue)


From: Stepan Kasal
Subject: srcdir detection (was: Re: gettext 0.14.5 compile issue)
Date: Thu, 4 Aug 2005 12:30:09 +0200
User-agent: Mutt/1.4.1i

Hello,

it seems we have discovered an Autoconf problem, so I'm moving this
subthread to bug-autoconf.  Make sure to cc Jason.

On Wed, Aug 03, 2005 at 10:17:45PM +0200, Bruno Haible wrote:
> So it looks like your "build system" is doing
>
>     ./configure --prefix=/xsys --srcdir=`pwd`
...
> This has the effect of starting a VPATH build, with $builddir = $srcdir.
> You're probably the first one in the world to use this kind of build
> configuration :-)

I wouldn't be so sure.  As Jason told me in another post, he has never
used --srcdir; it was AC_CONFIG_SUBDIRS which generated the call:

/tmp/xsys.32647.0/gettext-0.14.5/gettext-tools/configure \
        '--prefix=/xsys' 'CC=gcc' 'CXX=g++' '--cache-file=/dev/null' \
        '--srcdir=/tmp/xsys.32647.0/gettext-0.14.5/gettext-tools'

AC_CONFIG_SUBDIRS always uses the --srcdir options, so that the subscripts
need not to autodetect it.

So far so good.  But why had the upper configure srcdir set to full path?

The autodetection code (_AC_INIT_SRCDIR in lib/autoconf/general.m4) tries
the folowing candidates for srcdir:
1) directory name of the configure script
2) ..

So if configure was called with full path, srcdir is set to the full path.
This can cause problems: VPATH build is recognized by "test $srcdir = ."
(for example, search ac_vpsub in lib/autoconf/status.m4).

I think _AC_INIT_SRCDIR should try srcdir=. before the other two
candidates.

A patch is attached (not tested at all).

To try this patch, you have to:
- checkout CVS Autoconf,
- apply the patch,
- build & install Autoconf,
- unpack gettext and cd into it
- run autoconf
- run ./configure
- make dist

Then you have a new gettext tarball (though perhaps with the same name),
which you can try.

Have a nice day,
        Stepan Kasal

Attachment: autoconf-20050804-srcdir.patch
Description: Text document


reply via email to

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