From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28819 invoked from network); 6 Dec 1999 18:39:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Dec 1999 18:39:58 -0000 Received: (qmail 496 invoked by alias); 6 Dec 1999 18:39:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8923 Received: (qmail 489 invoked from network); 6 Dec 1999 18:39:50 -0000 From: "Bart Schaefer" Message-Id: <991206183934.ZM10206@candle.brasslantern.com> Date: Mon, 6 Dec 1999 18:39:34 +0000 In-Reply-To: <19991206113152.A25632@dman.com> Comments: In reply to Clint Adams "PATCH: the transform saga, directories" (Dec 6, 11:31am) References: <19991206113152.A25632@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , zsh-workers@sunsite.auc.dk Subject: Re: PATCH: the transform saga, directories MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 6, 11:31am, Clint Adams wrote: } Subject: PATCH: the transform saga, directories } } This unfortunately brings back my make hack in order to } transform fndir and MODDIR. This still doesn't really work. The reason that you need the "make -f" hack is because ${program_transform_name} has been processed so that @program_tranform_name@ can appear in Makefiles even if part of the transform introduces a $ or backslash into the name. You're processing that away by passing the string through make, and then not putting it back again. Here's some aczsh.m4 code that reverses and re-applies the autoconf sed that's done on $program_transform_name. We could at this point simplify {Src,Doc}/Makefile.in again to use @tzsh@ in a few (though not all) places, but I haven't done that here. Index: aczsh.m4 =================================================================== @@ -595,3 +595,28 @@ AC_DEFINE(HAVE_[]translit($2_$3, [ a-z], [_A-Z])) fi ]) + +dnl +dnl zsh_ARG_PROGRAM +dnl Handle AC_ARG_PROGRAM substitutions into other zsh configure macros. +dnl After processing this macro, the configure script may refer to +dnl and $tzsh_name, and @tzsh@ is defined for make substitutions. +dnl + +AC_DEFUN(zsh_ARG_PROGRAM, +[AC_ARG_PROGRAM +# Un-double any \ or $ (doubled by AC_ARG_PROGRAM). +cat <<\EOF_SED > conftestsed +s,\\\\,\\,g; s,\$\$,$,g +EOF_SED +zsh_transform_name=`echo "${program_transform_name}" | sed -f conftestsed` +rm -f conftestsed +tzsh_name=`echo zsh | sed -e "${zsh_transform_name}"` +# Double any \ or $ in the transformed name that results. +cat <<\EOF_SED >> conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED +tzsh=`echo ${tzsh_name} | sed -f conftestsed` +rm -f conftestsed +AC_SUBST(tzsh)dnl +]) Index: configure.in =================================================================== @@ -46,17 +46,8 @@ dnl CHECKING COMMAND LINE OPTIONS dnl ----------------------------- dnl Handle --program-prefix, --program-suffix, etc. -AC_ARG_PROGRAM +zsh_ARG_PROGRAM -u_ptn=`make -s -f - <