diff --git a/Makefile.am b/Makefile.am index 4df671a..7d042c7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,6 @@ AM_CPPFLAGS=-I. -I$(srcdir)/include "-D_U_=__attribute__((unused))" \ "-D_R_(A,B)=__attribute__((format(printf,A,B)))" AM_CFLAGS=$(WARN_CFLAGS) LDADD = lib/libiscsi.la -XSLTPROC = /usr/bin/xsltproc # Manpages man1_MANS = doc/iscsi-inq.1 doc/iscsi-ls.1 doc/iscsi-swp.1 @@ -398,6 +397,12 @@ bin/ld_iscsi.so: bin/ld_iscsi.o $(CC) -shared -o bin/ld_iscsi.so bin/ld_iscsi.o -ldl endif -.xml.1: - -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< +XSLTPROC = /usr/bin/xsltproc + +.xml.1: +if BUILD_MANPAGES + $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< +else + echo "Building without manpages" +endif diff --git a/configure.ac b/configure.ac index 71b835d..ecabb58 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,14 @@ if test "$ac_cv_prog_gcc" = yes; then fi AC_SUBST(WARN_CFLAGS) +AC_ARG_ENABLE([manpages], + [AC_HELP_STRING([--enable-manpages], + [Enable building the manpages])], + [ENABLE_MANPAGES=$enableval], + [ENABLE_MANPAGES="no"]) +AM_CONDITIONAL(BUILD_MANPAGES, + [expr "$ENABLE_MANPAGES" : yes > /dev/null 2>&1]) + AC_CONFIG_HEADER(config.h) AC_CHECK_LIB([gcrypt], [gcry_control])