From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8402 invoked from network); 1 Jun 2001 22:30:02 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Jun 2001 22:30:02 -0000 Received: (qmail 17161 invoked by alias); 1 Jun 2001 22:29:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14679 Received: (qmail 17143 invoked from network); 1 Jun 2001 22:29:38 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) Message-ID: <3B1817C0.3080708@mow.siemens.ru> Date: Sat, 02 Jun 2001 02:31:28 +0400 From: Andrej Borsenkow User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.5-1mdk i686; en-US; rv:0.9) Gecko/20010521 X-Accept-Language: en MIME-Version: 1.0 To: Clint Adams CC: Zsh hackers list Subject: PATCH: Re: zsh and autoconf-2.50 References: <002901c0eaa8$359841f0$21c9ca95@mow.siemens.ru> <20010601110558.A32662@dman.com> Content-Type: multipart/mixed; boundary="------------000100030400060809000103" This is a multi-part message in MIME format. --------------000100030400060809000103 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Clint Adams wrote: >>BTW anybody else working on 2.50? Else I hope to produce new configure.ac >>next week. I cannot promise to resolve this issue with current configure.in >>though (unless it happens as a side effect). >> > > If you remove the hunk beginning with > > dnl The standard config.status is missing some essential features. > dnl So add them now. See the comment at the end of Src/mkmakemod.sh. > > config.status will be happier. I haven't looked into why. > > "Curiouser and curiouser!" cried Alice. Anyway - 2.50 generates totally different config.status and our modification breaks it. Moreover, as Akim said, 2.50 does not need this mod anymore. But what's worse - mkmakemod.sh relies on our mod so if we just leave it out it does not work any more :-) It does not work anyway because check for dynamic build does not work with 2.50 ... Here is patch that - checks for autoconf version. It thinks that anything <= 2.13 needs our hack, anything over - does not. It breaks with beta autoconf versions like 2.49f. It smells. - adds a string to config.status and lets mkmakemod.sh grep for it to decide when to use this hack. - adds check for 2.50-like subst's (t check for dynamic build). This is intended for 4.0.x only, and just to allow some poor soul to compile off CVS when we advice it without much fuss. And to allow me to build both 4.0.x and HEAD without maintaining two autoconf versions. :-) This is an absolute hack. Should I commit it? -andrej P.S. I just built freshly checked out 4.0 branch in sepearate build directory with these mods. P.P.S. 2.50 seems to not use cache by default - you need explicit option --cache-file (or --config-cache to default to config.cache). One more change in Makefiles. --------------000100030400060809000103 Content-Type: text/plain; name="zsh-ac2.50.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="zsh-ac2.50.diff" Index: aczsh.m4 =================================================================== RCS file: /cvsroot/zsh/zsh/aczsh.m4,v retrieving revision 1.10 diff -u -r1.10 aczsh.m4 --- aczsh.m4 2001/04/23 19:59:03 1.10 +++ aczsh.m4 2001/06/01 22:24:35 @@ -683,3 +683,21 @@ then LIBS="$4" else LIBS="$enable_libs" fi)]) + +dnl These macros are copied over from autoconf-2.13 +dnl They for not work with beta versions and are intended +dnl only to allow use of autoconf-2.50 for a transition time + +AC_DEFUN(zsh_ACVERSION_SPLIT, [translit($1, ., [, ])]) + +AC_DEFUN(zsh_ACVERSION_CANON, [$1, $2, ifelse([$3], , 0, [$3])]) + +AC_DEFUN(__zsh_CHECK_ACVERSION, + [ifelse(builtin([eval], + [$3 + $2 * 1000 + $1 * 1000000 <= $6 + $5 * 1000 + $4 * 1000000]), 1, [$7], [$8])]) + +AC_DEFUN(zsh_CHECK_ACVERSION, + [__zsh_CHECK_ACVERSION(zsh_ACVERSION_CANON(zsh_ACVERSION_SPLIT(AC_ACVERSION)), + zsh_ACVERSION_CANON(zsh_ACVERSION_SPLIT($1)), + [$2], + [$3])]) Index: configure.in =================================================================== RCS file: /cvsroot/zsh/zsh/configure.in,v retrieving revision 1.60 diff -u -r1.60 configure.in --- configure.in 2001/06/01 14:40:39 1.60 +++ configure.in 2001/06/01 22:24:36 @@ -1909,12 +1909,18 @@ dnl The standard config.status is missing some essential features. dnl So add them now. See the comment at the end of Src/mkmakemod.sh. -[rm -f $CONFIG_STATUS.old +dnl Starting from 2.50 Autoconf no more needs it and this modification +dnl results in broken config.status so check for version. We check only +dnl for officially released versions. +zsh_CHECK_ACVERSION([2.13], +[ +rm -f $CONFIG_STATUS.old cp $CONFIG_STATUS $CONFIG_STATUS.old -sed '1,$s@^\( *ac_file_inputs=\).*$@\1`echo $ac_file_in | sed -e "s%^%:%" -e "s%:\\([^!]\\)% $ac_given_srcdir/\\1%g" -e "s%:!% %"`@' \ +sed '1,$s@^\( *ac_file_inputs=\).*$@\1`echo $ac_file_in | sed -e "s%^%:%" -e "s%:\\([[^!]]\\)% $ac_given_srcdir/\\1%g" -e "s%:!% %"`@' \ $CONFIG_STATUS.old >$CONFIG_STATUS +echo '# Hack for autoconf 2.13' >>$CONFIG_STATUS chmod +x $CONFIG_STATUS - rm -f $CONFIG_STATUS.old] + rm -f $CONFIG_STATUS.old]) test "$real_no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 Index: Src/mkmakemod.sh =================================================================== RCS file: /cvsroot/zsh/zsh/Src/mkmakemod.sh,v retrieving revision 1.11 diff -u -r1.11 mkmakemod.sh --- Src/mkmakemod.sh 2001/05/20 10:59:28 1.11 +++ Src/mkmakemod.sh 2001/06/01 22:24:38 @@ -111,7 +111,9 @@ sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`" module_list="${bin_mods}${dyn_mods}" - if grep '%@D@%D%' config.status >/dev/null; then + # check both 2.13 and 2.50 syntax + if grep '%@D@%D%' config.status >/dev/null || + grep ',@D@,D,' config.status >/dev/null; then is_dynamic=true else is_dynamic=false @@ -463,7 +465,12 @@ fi -if $second_stage; then +if $second_stage ; then + if grep 'Hack for autoconf 2.13' ./config.status > /dev/null 2>&1 ; then + bang=\! + else + bang= + fi trap "rm -f $the_subdir/${the_makefile}" 1 2 15 @@ -472,7 +479,7 @@ # tree, this is a problem. zsh's configure script edits config.status, # adding the feature that an input filename starting with "!" has the # "!" removed and is not mangled further. - CONFIG_FILES=$the_subdir/${the_makefile}:\!$the_subdir/${the_makefile}.in CONFIG_HEADERS= ${CONFIG_SHELL-/bin/sh} ./config.status + CONFIG_FILES=$the_subdir/${the_makefile}:$bang$the_subdir/${the_makefile}.in CONFIG_HEADERS= ${CONFIG_SHELL-/bin/sh} ./config.status fi --------------000100030400060809000103--