Re: Partial autoconf transition thoughts

Maciej W. Rozycki
2003-06-12T11:21:39Z

On 11 Jun 2003, Alexandre Oliva wrote:

> > Well, see how AM_INSTALL_LIBBFD is defined. ;-)
>
> Presumably you're configuring with --enable-shared
> --enable-install-libbfd. I'd never done that :-)
>
> Anyway, $(exec_prefix)/$(host_alias) is entirely pointless.
> $(exec_prefix) is already supposed to be host-specific.

But libbfd is target-specific, so you can't install it directly in
$exec_prefix. As the result of the discussion I wrote of, the current
approach was selected from two alternatives:
$exec_prefix/$host_alias/$target_alias/lib and
$exec_prefix/$target_alias/$host_alias/lib. Of coures neither
$exec_prefix/lib nor $exec_prefix/$target_alias/lib can be used as they
(may) hold other versions of libbfd and $exec_prefix/$host_alias cannot
be, either, as it would work for a single target only.

> > Why is that so? I am looking at what autoconf does right now and I can
> > see that $ac_cv_host_alias is set to $ac_cv_build_alias if $host_alias is
> > empty and $ac_cv_target_alias is set to ac_cv_host_alias if $target_alias
> > is empty.
>
> Which autoconf are you looking at?

2.57

> > I hope not for the lone reason of differing between
> > implied and user-specified values
>
> This was the reason for the behavior change, yes.

IMHO, it should be stated explicitly, e.g. $host_cross and $target_cross
be set to "yes" if --host and --target are specified by a user,
respectively, otherwise they should be set to "no" and
${build,host,target}_alias should be set to valid system names
unconditionally. This should simplify the generated output and move the
decision on native vs cross to a single place.

> > That's a reasonable approach for now, but why can't autoconf be fixed
> > ultimately?
>
> I can't think of any reason for that. But we're trying to move to
> autoconf 2.57, not some hacked version thereof, so we have to cope
> with its limitations for now.

OK, so I assume that's more an accident during the transition to the new
setup of 2.5x than a design decision. Good.

> > Indeed, but I would prefer to see it done in autoconf so that it need not
> > be repeated locally elsewhere.
>
> It feels like you're volunteering to convert Nathanael's macros into
> autoconf, do I read it right? :-D :-D

I would actually do that a bit differetly, more or less as I stated
above, but I would of course look at the Nathanael's macros and reuse to
good bits. Anyway don't hold your breath -- I lack time these days
desperately. I'll look at this problem when I can afford.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +