Re: How to install "config.h"

2000-10-29 Thread Assar Westerlund

Robert Boehne <[EMAIL PROTECTED]> writes:
> I have a massive set of C++ libraries that use
> CVS libtool, autoconf and automake to build and install.
> Since users then need to have _all_ the header files
> they also need to have the configure generated config.h
> 
> What is the "best" way to coerce Automake into installing
> config.h in $(prefix) ?

I must caution against installing config.h.  You will collide with the
potential same config.h and HAVE* et al defines that the application
using your header files has figured out for itself.

It's much preferable to make sure that the installed include-files do
not depend on the autoconf'd parameters in any way.  If you really
need to use the definitions that configure has figured out for you,
it's much better, I think, to partial-evaluate so that instead of:

bar.h:

#ifdef HAVE_FOO_H
#include 
#endif

you make it unconditional (empty or just with the include).  This will
make that file machine-dependent, but you can most likely limit this
to one file and have all the other header files be shared.

And if you install config.h, it should be as PACKAGE-config.h.

/assar




Re: PATCH: patsubst support

2000-10-29 Thread Kevin Ryde

Alex Hornby <[EMAIL PROTECTED]> writes:
>
> # Makefile.am fragment
> FOO = foo bar
> BAR = ${FOO:%=%.c}
> ...
> 
> What do people think?

It'd be nice to be able to embed little fragments of perl to do things
like that, for the "static" case that is.  But perhaps that idea has
come up before.  Or naturally the whole Makefile.am could be a
generated file if desired.




Re: PATCH: patsubst support

2000-10-29 Thread Alexandre Oliva

On Oct 28, 2000, Alex Hornby <[EMAIL PROTECTED]> wrote:

> What is the policy regarding changes to non-portable behavour?

automake is supposed to generate portable Makefiles, so I think the
default should be static expansion.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist*Please* write to mailing lists, not to me