[Rpm-maint] [draft] spec file unification: autotools based projects
Marc Haisenko
haisenko at comdasys.com
Fri Jul 18 11:58:17 UTC 2008
On Friday 18 July 2008, Stanislav Brabec wrote:
> Marc Haisenko wrote:
> > What about passing autoconf cache variables ? I regularly need to do
> > things like:
> >
> > ac_cv_foo=yes \
> > ac_cv_bar=no \
> > ./configure ...
>
> It should not appear in the spec files, as it is not packages specific,
> but platform specific.
Consider you are creating spec files with cross-compiled programs. There you
NEED to do these things as a lot of autoconf tests want to compile and run a
program which is obviously not possible if you compile for a different
architecture. In these cases you need to pass the results via cache
variables.
> Hopefully autotools provide a support for system-wide caches and
> settings.
>
> You could create a global cache of these variables (for example
> OpenEmbedded does). You can modify definition of %configure or define
> extra variables in your global RPM macros to build it with this cache,
> or do some config.site magic.
And how is that supposed to work ? I would need a way for each spec to tell
RPM "I'm now compiling for environment X, grab me the appropiate %configure".
I'm cross-compiling to several different architectures, if I were to only
cross-compile to one then your suggestions would make sense to me.
> Regarding the cross compilation, autotools have much more problems than
> rpmbuild, so we are still very far from the situation, when unpatched
> standard spec files could be usable for cross compilation.
I don't think this will ever be possible :-) And I don't think that this
should be a goal. I just wanted to remind that there ARE situations in which
you need to pass cache variables to autoconf and I don't want to "export"
them when I need them only for one command (configure).
Marc
--
Marc Haisenko
Comdasys AG
Rüdesheimer Str. 7
80686 München
Germany
Tel.: +49 (0)89 548 433 321
More information about the Rpm-maint
mailing list