about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Config/defs.mk.in2
-rw-r--r--configure.in13
2 files changed, 12 insertions, 3 deletions
diff --git a/Config/defs.mk.in b/Config/defs.mk.in
index bbc42b236..f159cf9dc 100644
--- a/Config/defs.mk.in
+++ b/Config/defs.mk.in
@@ -33,7 +33,7 @@ prefix          = @prefix@
 exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
-MODDIR          = $(libdir)/zsh/$(VERSION)
+MODDIR          = $(libdir)/@tzsh@/$(VERSION)
 infodir         = @infodir@
 mandir          = @mandir@
 fndir           = @fndir@
diff --git a/configure.in b/configure.in
index de8d06dc0..d9b119925 100644
--- a/configure.in
+++ b/configure.in
@@ -48,6 +48,15 @@ dnl -----------------------------
 dnl Handle --program-prefix, --program-suffix, etc.
 AC_ARG_PROGRAM
 
+u_ptn=`make -s -f - <<EOF
+all:
+	@echo ${program_transform_name}
+EOF
+`
+tzsh=`echo zsh | sed -e "${u_ptn}"`
+
+AC_SUBST(tzsh)dnl
+
 dnl Do you want to debug zsh?
 undefine([zsh-debug])dnl
 AC_ARG_ENABLE(zsh-debug,
@@ -214,10 +223,10 @@ undefine([fndir])dnl
 AC_ARG_ENABLE(fndir,
 [  --enable-fndir=DIR         where functions go (default DATADIR/zsh/functions)],
 [if test $enableval = yes; then
-  fndir=${datadir}/zsh/functions
+  fndir=${datadir}/${tzsh}/functions
 else
   fndir="$enableval"
-fi], [fndir=${datadir}/zsh/functions])
+fi], [fndir=${datadir}/${tzsh}/functions])
 
 undefine([function_subdirs])
 AC_ARG_ENABLE(function-subdirs,