From 2a98e0ac1bebbae6cdf6a028e61e92f64e60e368 Mon Sep 17 00:00:00 2001 From: Edmundo Ferreira Date: Thu, 5 Dec 2019 10:57:11 +0100 Subject: [PATCH] Adds autotools option for building without documentation - removes a2x dependency used for man page generation by configuring with: ./configure --disable-documentation --- Makefile.am | 3 +++ configure.ac | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am index 2d51335..2708ace 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,6 +58,7 @@ endif ykpamcfg_SOURCES = ykpamcfg.c ykpamcfg_LDADD = libpam_util.la +if ENABLE_DOC if YKPERS dist_man1_MANS = ykpamcfg.1 endif @@ -78,6 +79,8 @@ SUFFIXES = .1.txt .1 .8.txt .8 $(A2X) -L --format=manpage -a revdate="Version $(VERSION)" $< +endif + if ENABLE_COV AM_CFLAGS += --coverage AM_LDFLAGS = --coverage diff --git a/configure.ac b/configure.ac index d44f40a..38471df 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,14 @@ AC_CHECK_LIB([pam], [pam_start], [AC_SUBST([LIBPAM], ["-lpam"])]) AC_SEARCH_LIBS([pam_modutil_drop_priv], ["pam"], [AC_DEFINE([HAVE_PAM_MODUTIL_DROP_PRIV], [1])]) +# --disable-documentation +AC_ARG_ENABLE([documentation], + [AS_HELP_STRING([--disable-documentation], + [do not build documentation])], + [enable_doc="${enableval}" ], + [enable_doc="yes"]) +AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no") + AC_ARG_WITH([ldap], [AS_HELP_STRING([--without-ldap], [disable support for ldap])],