From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 642 invoked by alias); 20 Sep 2014 19:37:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33213 Received: (qmail 26789 invoked from network); 20 Sep 2014 19:36:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=RcseCjdv c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=AW-DWZTfyeoA:10 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=CgCDH8OrRiXKEBdVQvsA:9 a=CjuIK1q_8ugA:10 a=_dQi-Dcv4p4A:10 Date: Sat, 20 Sep 2014 20:36:48 +0100 From: Peter Stephenson To: "Zsh Hackers' List" Subject: Re: The default $fpath Message-ID: <20140920203648.092f2c39@pws-pc.ntlworld.com> In-Reply-To: <20140920200423.1959bc8c@pws-pc.ntlworld.com> References: <540AF773.5080407@linux.intel.com> <20140906194513.5b19931c@pws-pc.ntlworld.com> <8761h05zvt.fsf@ft.bewatermyfriend.org> <20140907000454.74cda356@pws-pc.ntlworld.com> <140906204405.ZM18404@torch.brasslantern.com> <20140907193139.3bf3d3dc@pws-pc.ntlworld.com> <1410119582.2513.51.camel@tkkaskin-mobl3.ger.corp.intel.com.tanuk.dy.fi> <20140907214005.3190037b@pws-pc.ntlworld.com> <140907140122.ZM12385@torch.brasslantern.com> <20140908112328.24371de3@pwslap01u.europe.root.pri> <87r3zm2wh6.fsf@ft.bewatermyfriend.org> <20140920200423.1959bc8c@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 20 Sep 2014 20:04:23 +0100 Peter Stephenson wrote: > +dnl Add /usr/local/share/zsh/site-functions if not yet present. > +dnl It might be present owing to an explicit sitefndir or the install > +dnl prefix if the shell is installed under the name "zsh". > +if test X$sitefndir = X/usr/local/zsh/site-functions > +then fixed_sitefndir='' > +elif test X$ac_default_prefix != X/usr/local > +then fixed_sitefndir=/usr/local/zsh/site-functions > +elif test X$tzsh_name != Xzsh > +then fixed_sitefndir=/usr/local/zsh/site-functions > +else fixed_sitefndir='' > +fi > + ac_default_prefix is always /usr/local, it's not the --prefix. But surely the only place we're ever likely to get an other copy of the directory from is $sitefndir, whether set explicitly or based on the prefix? Also missed a substitution. Also, somehow, got the wrong directory, missing out the "share". But apart from that... diff --git a/Config/defs.mk.in b/Config/defs.mk.in index f6ea5c1..3c84610 100644 --- a/Config/defs.mk.in +++ b/Config/defs.mk.in @@ -47,6 +47,7 @@ mandir = @mandir@ datarootdir = @datarootdir@ datadir = @datadir@ fndir = @fndir@ +fixed_sitefndir = @fixed_sitefndir@ sitefndir = @sitefndir@ scriptdir = @scriptdir@ sitescriptdir = @sitescriptdir@ diff --git a/configure.ac b/configure.ac index 68a2e91..b202940 100644 --- a/configure.ac +++ b/configure.ac @@ -315,16 +315,11 @@ else sitefndir="$enableval" fi], [sitefndir=${datadir}/${tzsh_name}/site-functions]) -dnl Add /usr/local/share/zsh/site-functions if not yet present. -dnl It might be present owing to an explicit sitefndir or the install -dnl prefix if the shell is installed under the name "zsh". -if test X$sitefndir = X/usr/local/zsh/site-functions +dnl Add /usr/local/share/zsh/site-functions if not yet present +dnl owing to $sitefndir, whether or not explicitly given. +if test X$sitefndir = X/usr/local/share/zsh/site-functions then fixed_sitefndir='' -elif test X$ac_default_prefix != X/usr/local -then fixed_sitefndir=/usr/local/zsh/site-functions -elif test X$tzsh_name != Xzsh -then fixed_sitefndir=/usr/local/zsh/site-functions -else fixed_sitefndir='' +else fixed_sitefndir=/usr/local/share/zsh/site-functions fi ifdef([function_subdirs],[undefine([function_subdirs])])