[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD /bin/sh with SHELL=.../zsh breaking autoconf ./configure?
From: |
Ralf Wildenhues |
Subject: |
Re: FreeBSD /bin/sh with SHELL=.../zsh breaking autoconf ./configure? |
Date: |
Tue, 11 Mar 2008 08:03:55 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
* Mike Meyer wrote on Tue, Mar 11, 2008 at 01:58:52AM CET:
> On Tue, 11 Mar 2008 01:15:11 +0100 Ralf Wildenhues <address@hidden> wrote:
> > * Mike Meyer wrote on Sun, Mar 09, 2008 at 02:56:50AM CET:
> > >
> > > The configure script otherwise seems to run fine, creates the
> > > Makefile, and exits without any other errors. Likewise, there are no
> > > errors in config.log, nor any mention of as_func or shell
> > > functions. However, the Makefile is pretty horribly broken.[...]
> > Can you send a unidiff of the broken case and a working case (/bin/sh)
> > for the config.status file and the Makefile which causes make to bail?
>
> Attached.
>
> > Also, which zsh version is this?
>
> zsh 4.3.2 (amd64-portbld-freebsd6.2)
Thanks. This patch ports Python's makesetup to be usable with zsh, and
results in a Makefile identical to one created with bash. I have not
checked whether other shell scripts in the Python package need similar
treatment. Please report this to the Python folks (best if you also
mention the CONFIG_SHELL workaround I wrote in the previous mail).
Cheers,
Ralf
* Modules/makesetup: Port to zsh, taken from Autoconf.
--- Python-2.5.2/Modules/makesetup.orig 2008-03-11 07:59:23.000000000 +0100
+++ Python-2.5.2/Modules/makesetup 2008-03-11 07:58:53.000000000 +0100
@@ -39,6 +39,16 @@
# - for each variable definition found in Setup, insert the definition
# before the comment 'Definitions added by makesetup'
+# zsh workaround
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+fi
+
# Loop over command line options
usage='
usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre]