[Top][All Lists]

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


From: Harlan Stenn
Subject: Re: AM_C*FLAGS and C*FLAGS
Date: Mon, 26 Jun 2006 08:43:15 +0000

> On Mon, 2006-06-26 at 04:34 +0000, Harlan Stenn wrote:
> > We are told that we should not use CPPFLAGS or CFLAGS in a,
> > as they are for users.
> That's only partially true.
> More precisely: You should not override user-supplied CPPFLAGS, CFLAGS,
> Appending something to these vars would be OK, provided the
> user-provided settings "always win".

And how, exactly, is that supposed to work?

If we supply values for *FLAGS, how does the user easily keep those and
append their own?

> > The trick is that if we use a file to help decide what
> > flags may be needed, >inside< this configure script we need to use
> > CFLAGS and CPPFLAGS to effect the running of configure.

> Depends on what you add to *FLAGS.

Please elaborate.

For (possibly bad) examples, once upon a time I was told by developers
that in order have a successful 'configure' run and to build The
Software on:

- i386-sequent-sysv4 that we needed to have CFLAGS+= -Wc,+abi-socket
  (please excuse the shorthand)
- *-*-mpeix that we need:
     (and LDFLAGS+="-L/SYSLOG/PUB" and LIBS+="-lcurses")
- *-next-nextstep4: CFLAGS+=-posix

On more recent/normal issues, there are other cases where we may be
pointed at "local" installation areas for OpenSSL, which would require
feeding an override for -I and -L to the remainder of the configure
script and also passing these values into the Makefile.

Exactly how do you propose this be done?

> One standard approach would be to use *FLAGS as package-global FLAGS and
> AM_*FLAGS as FLAGS, i.e. not to AC_SUBST(AM_*FLAGS)
> inside of a, but set up AM_*FLAGS inside of each
> anew from other AC_SUBST'ed vars to provide more
> fine-grained control over FLAGS.

Which is useful to some projects, I expect, but not mine...

Again, if *FLAGS (I assume you mean CFLAGS, CPPFLAGS, LFLAGS, etc.) are
set in configure and propagated to the Makefile's, how does the user
override these without doing a lot of typing?


reply via email to

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