From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: How to cache $CFLAGS, $LIBS etc.
Date: Fri, 11 Aug 2000 19:08:23 +0100 [thread overview]
Message-ID: <0FZ500LDV3Q0I2@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Fri, 11 Aug 2000 16:16:10 -0000." <1000811161610.ZM9646@candle.brasslantern.com>
Bart wrote:
> 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.
Seems OK. I've only tried it with the CFLAGS and LIBS values.
Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.1.1.21
diff -u -r1.1.1.21 INSTALL
--- INSTALL 2000/03/01 18:31:21 1.1.1.21
+++ INSTALL 2000/08/11 18:06:38
@@ -127,6 +127,15 @@
Or on systems that have the "env" program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+The flags CFLAGS, CPPFLAGS, LDFLAGS and LIBS can also be set as flags to
+configure, where the name appears in lower case:
+ configure --enable-cflags=-O2 --enable-libs=-lposix
+
+The advantage of this form is that `config.status --recheck' will remember
+the flags you originally specified. You can still override the flags when
+running `make' (although these will not be passed down via `config.status
+--recheck').
+
Check Generated Files
---------------------
Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 aczsh.m4
--- aczsh.m4 1999/12/06 19:01:52 1.1.1.9
+++ aczsh.m4 2000/08/11 18:06:38
@@ -620,3 +620,29 @@
rm -f conftestsed
AC_SUBST(tzsh)dnl
])
+
+AC_DEFUN(zsh_COMPILE_FLAGS,
+ [AC_ARG_ENABLE(cppflags,
+ [ --enable-cppflags=... specify C preprocessor flags],
+ if test "$enableval" = "yes"
+ then CPPFLAGS="$1"
+ else CPPFLAGS="$enable_cppflags"
+ fi)
+ 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="$2"
+ else LDFLAGS="$enable_ldflags"
+ fi)
+ AC_ARG_ENABLE(libs,
+ [ --enable-libs=... specify link libraries],
+ if test "$enableval" = "yes"
+ then LIBS="$3"
+ else LIBS="$enable_libs"
+ fi)])
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.20
diff -u -r1.20 configure.in
--- configure.in 2000/08/08 14:57:02 1.20
+++ configure.in 2000/08/11 18:06:39
@@ -48,6 +48,9 @@
dnl Handle --program-prefix, --program-suffix, etc.
zsh_ARG_PROGRAM
+dnl Handle setting of compile flags (CPPFLAGS, CFLAGS, LDFLAGS, LIBS).
+zsh_COMPILE_FLAGS
+
dnl Do you want to debug zsh?
undefine([zsh-debug])dnl
AC_ARG_ENABLE(zsh-debug,
--
Peter Stephenson <pws@csr.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
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
2000-08-11 16:37 ` Bart Schaefer
2000-08-11 18:08 ` Peter Stephenson [this message]
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=0FZ500LDV3Q0I2@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).