Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: The default $fpath



On Sat, 20 Sep 2014 20:04:23 +0100
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> 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])])



Messages sorted by: Reverse Date, Date, Thread, Author