bin_SCRIPTS = curl-config
-SUBDIRS = lib src
+SUBDIRS = lib src scripts
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
pkgconfigdir = $(libdir)/pkgconfig
AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
[OPT_ZSH_FPATH=$withval])
case "$OPT_ZSH_FPATH" in
- no)
+ default|no)
dnl --without-zsh-functions-dir option used
;;
- default|yes)
+ yes)
dnl --with-zsh-functions-dir option used without path
ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
AC_SUBST(ZSH_FUNCTIONS_DIR)
AC_SUBST(ZSH_FUNCTIONS_DIR)
;;
esac
+AM_CONDITIONAL(USE_ZSH_COMPLETION, test x"$ZSH_FUNCTIONS_DIR" != x)
dnl **********************************************************************
dnl Check for fish completion path
AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
[OPT_FISH_FPATH=$withval])
case "$OPT_FISH_FPATH" in
- no)
+ default|no)
dnl --without-fish-functions-dir option used
;;
- default|yes)
+ yes)
dnl --with-fish-functions-dir option used without path
CURL_CHECK_PKGCONFIG(fish)
if test "$PKGCONFIG" != "no" ; then
AC_SUBST(FISH_FUNCTIONS_DIR)
;;
esac
+AM_CONDITIONAL(USE_FISH_COMPLETION, test x"$FISH_FUNCTIONS_DIR" != x)
dnl Now check for the very most basic headers. Then we can use these
dnl ones as default-headers when checking for the rest!
if CROSSCOMPILING
@echo "NOTICE: we can't generate zsh completion when cross-compiling!"
else # if not cross-compiling:
- @if ! test -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
+ @if ! test -x "$(PERL)"; then echo "No perl: can't install completion script"; exit 0; fi
$(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell zsh > $@
endif
if CROSSCOMPILING
@echo "NOTICE: we can't generate fish completion when cross-compiling!"
else # if not cross-compiling:
- @if ! test -x "$(PERL)"; then echo "No perl: can't install completion.pl"; exit 0; fi
+ @if ! test -x "$(PERL)"; then echo "No perl: can't install completion scriptl"; exit 0; fi
$(PERL) $(srcdir)/completion.pl --curl $(top_builddir)/src/curl$(EXEEXT) --shell fish > $@
endif
install-data-local:
if CROSSCOMPILING
- @echo "NOTICE: we can't install zsh completion when cross-compiling!"
+ @echo "NOTICE: we can't install completion scripts when cross-compiling!"
else # if not cross-compiling:
+if USE_ZSH_COMPLETION
$(MKDIR_P) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)
- $(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR)
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME)
+endif
+if USE_FISH_COMPLETION
+ $(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR)
$(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME)
endif
+endif