From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 751 invoked from network); 12 Aug 2000 00:41:44 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?wIpSARkKhmBPnoYYTj8cQdCaZ2uE3y/Q?@203.24.36.3) by ns1.primenet.com.au with SMTP; 12 Aug 2000 00:41:44 -0000 Received: (qmail 4473 invoked from network); 11 Aug 2000 17:18:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns2.primenet.com.au with SMTP; 11 Aug 2000 17:18:26 -0000 Received: (qmail 24010 invoked by alias); 11 Aug 2000 17:18:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12597 Received: (qmail 24002 invoked from network); 11 Aug 2000 17:18:11 -0000 From: "Bart Schaefer" Message-Id: <1000811163734.ZM9663@candle.brasslantern.com> Date: Fri, 11 Aug 2000 16:37:34 +0000 In-Reply-To: <1000811161610.ZM9646@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: How to cache $CFLAGS, $LIBS etc." (Aug 11, 4:16pm) References: <0FZ400K4WL6P0H@la-la.cambridgesiliconradio.com> <1000811161610.ZM9646@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: How to cache $CFLAGS, $LIBS etc. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 11, 4:16pm, Bart Schaefer wrote: } Subject: Re: How to cache $CFLAGS, $LIBS etc. } } 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" ^^ That should be "$2". Sorry about that. } else LDFLAGS="$enable_ldflags" } fi)]) The references to "$1" and "$2" are of course the argument of the m4 macro when called from configure, not shell positional parameters. E.g. you can put in configure.in zsh_compile_flags(-g3 -O0, -ltermcap) to cause those to be the defaults for --enable-cflags and --enable-ldflags. -- 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