zsh-workers
 help / color / mirror / code / Atom feed
* How to cache $CFLAGS, $LIBS etc.
@ 2000-08-11 11:28 Peter Stephenson
  2000-08-11 11:32 ` Ollivier Robert
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Stephenson @ 2000-08-11 11:28 UTC (permalink / raw)
  To: Zsh hackers list

The only way supported by configure of passing in special values of
compiler flags and libraries etc. is by setting the environment variables
CFLAGS and LIBS.  That's fine the first time you run configure, but they
aren't remembered so (1) if you run it again, you have to specify them
again from memory or by digging around deep inside the configuration files
(2) rather worse, if changes to the configuration force `configure --recheck'
they are automatically stomped on.  This has been regularly getting my goat
for several years.

So I tried to think up a way of doing it better.  Here are the
possibilities.

1. Simply cache any value for a specified set of environment variables, and
re-use them any time no explicit value was passed.  Unfortunately, caching
doesn't really work that way.  Either you have to cache something the first
time and use it ever after, or you don't cache it at all, which isn't quite
what I want.

2. Use `--enable-cflags', `--enable-libs', `--enable-ldflags' or whatever.
This probably ought to work because the arguments are remembered for use
with --recheck.  But the guide for how configure is used is pretty
fascistic about not allowing anything RMS wouldn't like, so I don't know if
there are drawbacks to this.  Plus we need to be careful if people supply
environment variables in the standard way.

Does anyone know how to do this properly?

-- 
Peter Stephenson <pws@csr.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-08-16 12:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-11 11:28 How to cache $CFLAGS, $LIBS etc Peter Stephenson
2000-08-11 11:32 ` Ollivier Robert
2000-08-11 13:48   ` Trond Eivind Glomsrød
2000-08-11 16:16 ` Bart Schaefer
2000-08-11 16:37   ` Bart Schaefer
2000-08-11 18:08   ` Peter Stephenson
2000-08-16  7:25 ` Andrej Borsenkow
2000-08-16 12:56   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).