executables := @executables@
GENGETOPT := @gengetopt@
+HELP2MAN := @help2man@
build_date := $(shell date)
uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
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 $<'
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