From a4c69582ab4ea52ff5bfdb4e09c424d36f5585af Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 4 Jun 2011 13:18:05 +0200 Subject: [PATCH] configure: Check for help2man. help2man is required for generating the man pages, so we should print a proper error message at configure time if help2man is not installed. --- Makefile.in | 13 +++++++------ configure.ac | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index 58553d77..660c381b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -12,6 +12,7 @@ cmdline_dir := @cmdline_dir@ executables := @executables@ GENGETOPT := @gengetopt@ +HELP2MAN := @help2man@ build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") @@ -123,17 +124,17 @@ server_command_lists_ch = server_command_list.c afs_command_list.c \ server_command_list.h afs_command_list.h server_command_lists_man = server_command_list.man afs_command_list.man man/man1/para_server.1: para_server $(server_command_lists_man) | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' + @[ -z "$(Q)" ] || echo 'MAN $<' $(Q) opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ - help2man $$opts ./para_server > $@ + $(HELP2MAN) $$opts ./para_server > $@ man/man1/para_audiod.1: para_audiod audiod_command_list.man | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' - $(Q) help2man -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ + @[ -z "$(Q)" ] || echo 'MAN $<' + $(Q) $(HELP2MAN) -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ man/man1/%.1: % | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' - $(Q) help2man -h --detailed-help -N ./$< > $@ + @[ -z "$(Q)" ] || echo 'MAN $<' + $(Q) $(HELP2MAN) -h --detailed-help -N ./$< > $@ man/html/%.html: man/man1/%.1 @[ -z "$(Q)" ] || echo 'MAN2HTML $<' diff --git a/configure.ac b/configure.ac index fd2e073b..cc88cf83 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,9 @@ AC_PATH_PROG([gengetopt], [gengetopt]) test -z "$gengetopt" && AC_MSG_ERROR( [gengetopt is required to build this package]) - +AC_PATH_PROG([help2man], [help2man]) +test -z "$help2man" && AC_MSG_ERROR( + [help2man is required to build this package]) AC_PROG_CC AC_PROG_CPP -- 2.39.2