summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Vinson <nvinson234@gmail.com>2016-07-02 11:34:20 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-03 10:43:05 +0200
commit90c899d46a8f67540fad4ad156f4254fafb4a08d (patch)
tree210204d4e102106bac283ac121340e0a885ced99
parentad04b6e6903328480a824177d0e7c90bd89050a4 (diff)
nft: configure.ac: Replace magic dblatex dep.
Add a configure switch to enable and disable PDF document generation. This switch is to replace the current method of automatically detecting dblatex and building the PDF documentation when present. Signed-off-by: Nicholas Vinson <nvinson234@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--configure.ac19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 0e7edcfd..877f530d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,12 @@ AC_ARG_ENABLE([debug],
AC_SUBST(with_debug)
AM_CONDITIONAL([BUILD_DEBUG], [test "x$with_debug" != xno])
+AC_ARG_ENABLE([pdf-doc],
+ AS_HELP_STRING([--enable-pdf-doc], [Enable PDF documentation]),
+ AS_IF([test "x$enable_pdf_doc" = "xno"], [enable_pdf_doc=no],
+ [enable_pdf_doc=yes]), [enable_pdf_doc=no])
+AM_CONDITIONAL([BUILD_PDF], [test "x$enable_pdf_doc" == "xyes" ])
+
# Checks for programs.
AC_PROG_CC
AC_PROG_MKDIR_P
@@ -63,11 +69,11 @@ AS_IF([test "$DOCBOOK2X_MAN" != "no"], [DB2MAN="$DOCBOOK2X_MAN"],
AC_SUBST(DB2MAN)
AM_CONDITIONAL([BUILD_MAN], [test -n "$DB2MAN"])
-AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
-AS_IF([test "$DBLATEX" == "no"],
- [AC_MSG_WARN([dblatex not found, no PDF manpages will be built])]
-)
-AM_CONDITIONAL([BUILD_PDF], [test "$DBLATEX" == "found"])
+AM_COND_IF([BUILD_PDF], [
+ AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
+ AS_IF([test "$DBLATEX" == "no"],
+ [AC_MSG_ERROR([dblatex not found])])
+])
# Checks for libraries.
PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
@@ -136,4 +142,5 @@ echo "
nft configuration:
cli support: ${with_cli}
enable debugging: ${with_debug}
- use mini-gmp: ${with_mini_gmp}"
+ use mini-gmp: ${with_mini_gmp}
+ enable pdf documentation: ${enable_pdf_doc}"