From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@csr.com>,
zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: How to cache $CFLAGS, $LIBS etc.
Date: Fri, 11 Aug 2000 16:16:10 +0000 [thread overview]
Message-ID: <1000811161610.ZM9646@candle.brasslantern.com> (raw)
In-Reply-To: <0FZ400K4WL6P0H@la-la.cambridgesiliconradio.com>
On Aug 11, 12:28pm, Peter Stephenson wrote:
} Subject: How to cache $CFLAGS, $LIBS etc.
}
} 2. Use `--enable-cflags', `--enable-libs', `--enable-ldflags' or whatever.
} This probably ought to work because the arguments are remembered for use
} with --recheck.
I've done this with configure in other packages; it works fine.
} 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.
Zsh isn't a GNU package, so I'm not especially concerned about RMS's
blood pressure.
} Plus we need to be careful if people supply
} environment variables in the standard way.
It actually all works pretty well as long as you don't try to use both
the environment variables and the --enable flags in the same configure
(with different values). The --enable flags always win.
If you use environment variables or make-command-line variables to change
the CFLAGS at make time, they'll correctly override the --enable settings
for the actual build, but not for any tests run within an automatic re-
configure. If that's a problem we can most likely rewrite the Makefile.in
to force the appropriate --enable options to be passed to config.status;
e.g.
config.status --recheck --enable-cflags='$(CFLAGS)' ...
However, I've never yet found this to be an issue. If the new value of,
say, LIBS would result in a different configuration output, chances are
you should have run configure directly in the first place.
} Does anyone know how to do this properly?
This is lifted (and edited to change the name) from another acinclude.m4
that I wrote:
AC_DEFUN([zsh_compile_flags],
[AC_ARG_ENABLE(cflags,
[ --enable-cflags=... specify C compiler flags],
if test "$enableval" = "yes"
then CFLAGS="$1"
else CFLAGS="$enable_cflags"
fi)
[AC_ARG_ENABLE(ldflags,
[ --enable-ldflags=... specify linker flags],
if test "$enableval" = "yes"
then LDFLAGS="$1"
else LDFLAGS="$enable_ldflags"
fi)])
Add any others that you want, stick it in aczsh.m4, etc., you know the
drill.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2000-08-12 0:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-11 11:28 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 [this message]
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=1000811161610.ZM9646@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=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).