1 # SYNOPSIS 2 # 3 # AX_CHECK_ZSH_COMPLETION() 4 # 5 # DESCRIPTION 6 # 7 # Checks for the presence of an --with-zsh-completion-dir option to set a 8 # custom path to zsh completions. If no specified, it will use the default 9 # path as long as zsh is available. 10 # 11 12 #serial 1 13 14 AC_DEFUN([AX_CHECK_ZSH_COMPLETION], [ 15 AC_ARG_WITH([zsh-completion-dir], 16 AS_HELP_STRING([--with-zsh-completion-dir[=PATH]], 17 [Install the zsh auto-completion script in this directory. @<:@default=yes@:>@]), 18 [], 19 [with_zsh_completion_dir=yes]) 20 21 # Check zsh-completion 22 if test "x$with_zsh_completion_dir" = "xyes"; then 23 AC_ARG_VAR([ZSH_AVAILABLE], []) 24 AC_CHECK_PROG([ZSH_AVAILABLE], [zsh], [yes], [no]) 25 26 AS_IF([test "$ZSH_AVAILABLE" = "yes"], [ 27 ZSH_COMPLETION_DIR="$datadir/zsh/vendor-completions" 28 ], [ 29 ZSH_COMPLETION_DIR="" 30 ]) 31 else 32 ZSH_COMPLETION_DIR="$with_zsh_completion_dir" 33 fi 34 AC_SUBST([ZSH_COMPLETION_DIR]) 35 AM_CONDITIONAL([ENABLE_ZSH_COMPLETION], [test "x$with_zsh_completion_dir" != "xno" && test "$ZSH_COMPLETION_DIR" != ""]) 36 ]) 37
