configure: Check for help2man.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jun 2011 11:18:05 +0000 (13:18 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 30 Jul 2011 17:41:08 +0000 (19:41 +0200)
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
configure.ac

index 58553d77b0bab475d981613f583a23ee845b1ecd..660c381b5815f10d7dc9cd95f28c7cdc955e2366 100644 (file)
@@ -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 $<'
index fd2e073b6eb17c44751979743fcd90987f085f65..cc88cf83d85bd005a11feb8ed72c4741ee5322b9 100644 (file)
@@ -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