configure: if no perl, disable unity and shell completion, related tidy ups

Also:
- GHA/linux, macos: test `install` with autotools too.
- GHA/linux, macos: enable fish and zsh completion in an autotools job.
- scripts: drop dynamic perl checks redundant after this patch.
- scripts: drop two interim variables.
- autotools: make `build-certs` target check perl first.
- autotools: replace `$(PERL)` with `@PERL@` to match the pattern used
  in most automake scripts. For consistency. This makes `PERL` be
  defined at configure-time, as opposed to make-time, for these cases
  now.

Closes #18141
This commit is contained in:
Viktor Szakats 2025-08-02 00:18:12 +02:00
parent c27a2db54f
commit 1644a49ab8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
8 changed files with 45 additions and 36 deletions

View file

@ -29,10 +29,6 @@ EXTRA_DIST = coverage.sh completion.pl firefox-db2pem.sh checksrc.pl checksrc-al
dist_bin_SCRIPTS = wcurl
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
PERL = @PERL@
if USE_ZSH_COMPLETION
ZSH_COMPLETION_FUNCTION_FILENAME = _curl
endif
@ -46,28 +42,22 @@ all-local: $(ZSH_COMPLETION_FUNCTION_FILENAME) $(FISH_COMPLETION_FUNCTION_FILENA
if USE_ZSH_COMPLETION
$(ZSH_COMPLETION_FUNCTION_FILENAME): completion.pl
if test -z "$(PERL)"; then echo 'No perl: cannot generate completion script'; else \
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell zsh > $@; fi
@PERL@ $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell zsh > $@
endif
if USE_FISH_COMPLETION
$(FISH_COMPLETION_FUNCTION_FILENAME): completion.pl
if test -z "$(PERL)"; then echo 'No perl: cannot generate completion script'; else \
$(PERL) $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell fish > $@; fi
@PERL@ $(srcdir)/completion.pl --opts-dir $(top_srcdir)/docs/cmdline-opts --shell fish > $@
endif
install-data-local:
if USE_ZSH_COMPLETION
if test -n "$(PERL)"; then \
$(MKDIR_P) $(DESTDIR)$(ZSH_FUNCTIONS_DIR); \
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(ZSH_FUNCTIONS_DIR)/$(ZSH_COMPLETION_FUNCTION_FILENAME); \
fi
$(MKDIR_P) $(DESTDIR)@ZSH_FUNCTIONS_DIR@
$(INSTALL_DATA) $(ZSH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)@ZSH_FUNCTIONS_DIR@/$(ZSH_COMPLETION_FUNCTION_FILENAME)
endif
if USE_FISH_COMPLETION
if test -n "$(PERL)"; then \
$(MKDIR_P) $(DESTDIR)$(FISH_FUNCTIONS_DIR); \
$(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)$(FISH_FUNCTIONS_DIR)/$(FISH_COMPLETION_FUNCTION_FILENAME); \
fi
$(MKDIR_P) $(DESTDIR)@FISH_FUNCTIONS_DIR@
$(INSTALL_DATA) $(FISH_COMPLETION_FUNCTION_FILENAME) $(DESTDIR)@FISH_FUNCTIONS_DIR@/$(FISH_COMPLETION_FUNCTION_FILENAME)
endif
distclean: