zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: How to cache $CFLAGS, $LIBS etc.
Date: Fri, 11 Aug 2000 12:28:00 +0100	[thread overview]
Message-ID: <0FZ400K4WL6P0H@la-la.cambridgesiliconradio.com> (raw)

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


             reply	other threads:[~2000-08-11 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-11 11:28 Peter Stephenson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0FZ400K4WL6P0H@la-la.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).