summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-09-20 21:07:44 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-09-20 21:07:44 +0100
commite171c1932024c96b8e564ab7f3febdbe8a4259dd (patch)
treeedac292bb2198ebb8c758b3bed5557976bb8af99
parent16db7979e705ec0db5b8987eec654b91e3fce1f8 (diff)
downloadzsh-e171c1932024c96b8e564ab7f3febdbe8a4259dd.tar.gz
zsh-e171c1932024c96b8e564ab7f3febdbe8a4259dd.tar.xz
zsh-e171c1932024c96b8e564ab7f3febdbe8a4259dd.zip
33214 (modified further): test prefixes for site fpath better
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac13
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0788d9338..c58186b5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-09-20  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 33214 (modified yet further): configure.ac: test prefixes better.
+
 	* 33213: configure.ac, Config/defs.mk.in: try again.
 
 	* 33212: Src/zsh.mdd: Src/init.c, Src/zsh.mdd, configure.ac: add
diff --git a/configure.ac b/configure.ac
index b20294043..b0304fd92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,9 +317,20 @@ fi], [sitefndir=${datadir}/${tzsh_name}/site-functions])
 
 dnl Add /usr/local/share/zsh/site-functions if not yet present
 dnl owing to $sitefndir, whether or not explicitly given.
+dnl If not explicitly given, it hasn't been expanded yet.
 if test X$sitefndir = X/usr/local/share/zsh/site-functions
 then fixed_sitefndir=''
-else fixed_sitefndir=/usr/local/share/zsh/site-functions
+elif test X$prefix != X/usr/local; then
+  if test X$prefix = XNONE && test X$ac_default_prefix = X/usr/local; then
+    if test X$tzsh_name != Xzsh
+    then fixed_sitefndir=/usr/local/share/zsh/site-functions
+    else fixed_sitefndir=''
+    fi
+  else fixed_sitefndir=/usr/local/share/zsh/site-functions
+  fi
+elif test X$tzsh_name != Xzsh
+then fixed_sitefndir=/usr/local/share/zsh/site-functions
+else fixed_sitefndir=''
 fi
 
 ifdef([function_subdirs],[undefine([function_subdirs])])