Skip to content

Commit

Permalink
option to not build man page
Browse files Browse the repository at this point in the history
fixes #56
  • Loading branch information
wookietreiber committed Dec 26, 2015
1 parent e044a6d commit 936d806
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 19 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,28 @@ AC_CHECK_FILE(
[src/pixz.1],
[],
[
AC_CHECK_PROG(A2X, a2x, a2x, [])
if test "x$A2X" = x ; then
AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
fi
AC_ARG_WITH(
[manpage],
[ --without-manpage don't build man page],
[case ${withval} in
yes) manpage=true ;;
no) manpage=false ;;
*) AC_MSG_ERROR([bad value ${withval} for --with-manpage]) ;;
esac],
[manpage=true]
)
]
)

AM_CONDITIONAL([MANPAGE], [test x$manpage = xtrue])

if test x$manpage = xtrue ; then
AC_CHECK_PROG(A2X, a2x, a2x, [])
if test "x$A2X" = x ; then
AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
fi
fi

# Checks for libraries.
AC_CHECK_LIB([m], [ceil])
AX_PTHREAD
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pixz_SOURCES = \
read.c \
write.c

if MANPAGE
# TODO remove when possible: This is a hack because a2x is not able to output the man pages to a
# specific directory, only to where the source is.
pixz.1: pixz.1.asciidoc
Expand All @@ -26,3 +27,4 @@ man_MANS = pixz.1
CLEANFILES = pixz.1

EXTRA_DIST = $(man_MANS) pixz.1.asciidoc
endif

0 comments on commit 936d806

Please sign in to comment.