Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Tweak caching of CFLAGS etc.
- X-seq: zsh-workers 12601
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Tweak caching of CFLAGS etc.
- Date: Mon, 14 Aug 2000 01:42:28 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
One trouble with using AC_ARG_ENABLE for this trick is that it accepts the
--enable-xxx flag with no following argument. The way zsh_COMPILE_FLAGS
was being used, meant that would set the corresponding variable to empty.
Another trouble is of course that --disable-xxx is also accepted, but in
this case it's silently ignored, so I'm not going to worry about it.
The following patch causes --enable-cflags et al. to preserve the current
setting of the corresponding variable. An alternative would be to call
AC_MSG_WARN to produce a warning message when one of those options is
used without an argument.
Index: aczsh.m4
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/aczsh.m4,v
retrieving revision 1.12
diff -u -r1.12 aczsh.m4
--- aczsh.m4 2000/08/13 17:07:42 1.12
+++ aczsh.m4 2000/08/13 22:54:09
@@ -631,18 +631,18 @@
AC_ARG_ENABLE(cflags,
[ --enable-cflags=... specify C compiler flags],
if test "$enableval" = "yes"
- then CFLAGS="$1"
+ then CFLAGS="$2"
else CFLAGS="$enable_cflags"
fi)
AC_ARG_ENABLE(ldflags,
[ --enable-ldflags=... specify linker flags],
if test "$enableval" = "yes"
- then LDFLAGS="$2"
+ then LDFLAGS="$3"
else LDFLAGS="$enable_ldflags"
fi)
AC_ARG_ENABLE(libs,
[ --enable-libs=... specify link libraries],
if test "$enableval" = "yes"
- then LIBS="$3"
+ then LIBS="$4"
else LIBS="$enable_libs"
fi)])
Index: configure.in
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/configure.in,v
retrieving revision 1.85
diff -u -r1.85 configure.in
--- configure.in 2000/08/13 17:07:42 1.85
+++ configure.in 2000/08/13 22:55:37
@@ -49,7 +49,7 @@
zsh_ARG_PROGRAM
dnl Handle setting of compile flags (CPPFLAGS, CFLAGS, LDFLAGS, LIBS).
-zsh_COMPILE_FLAGS
+zsh_COMPILE_FLAGS($CPPFLAGS, $CFLAGS, $LDFLAGS, $LIBS)
dnl Do you want to debug zsh?
undefine([zsh-debug])dnl
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author