This patch adds the --enable-man-pages option, defaulting to "yes", to libapparmor's configure stage so that libapparmor can be built on systems lacking Perl.
Signed-off-by: Tyler Hicks <[email protected]> --- libraries/libapparmor/configure.ac | 19 ++++++++++++++----- libraries/libapparmor/doc/Makefile.am | 4 ++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libraries/libapparmor/configure.ac b/libraries/libapparmor/configure.ac index 27c0c55..15155c5 100644 --- a/libraries/libapparmor/configure.ac +++ b/libraries/libapparmor/configure.ac @@ -14,11 +14,19 @@ PKG_PROG_PKG_CONFIG AC_PATH_PROG([SWIG], [swig]) -sinclude(m4/ac_podchecker.m4) -PROG_PODCHECKER - -sinclude(m4/ac_pod2man.m4) -PROG_POD2MAN +AC_MSG_CHECKING([whether the libapparmor man pages should be generated]) +AC_ARG_ENABLE(man_pages, +[AS_HELP_STRING([--enable-man-pages], [generate the libapparmor man pages [[default=yes]]])], +[AC_MSG_RESULT($enableval)], +[enable_man_pages=yes] +[AC_MSG_RESULT($enable_man_pages)]) +if test "$enable_man_pages" = "yes"; then + sinclude(m4/ac_podchecker.m4) + PROG_PODCHECKER + + sinclude(m4/ac_pod2man.m4) + PROG_POD2MAN +fi AC_MSG_CHECKING([whether python bindings are enabled]) AC_ARG_WITH(python, @@ -57,6 +65,7 @@ if test "$with_ruby" = "yes"; then fi +AM_CONDITIONAL(ENABLE_MAN_PAGES, test x$enable_man_pages = xyes) AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes) AM_CONDITIONAL(HAVE_PERL, test x$with_perl = xyes) AM_CONDITIONAL(HAVE_RUBY, test x$with_ruby = xyes) diff --git a/libraries/libapparmor/doc/Makefile.am b/libraries/libapparmor/doc/Makefile.am index eeccacb..4591a71 100644 --- a/libraries/libapparmor/doc/Makefile.am +++ b/libraries/libapparmor/doc/Makefile.am @@ -3,6 +3,8 @@ POD2MAN = pod2man PODCHECKER = podchecker +if ENABLE_MAN_PAGES + man_MANS = aa_change_hat.2 aa_change_profile.2 aa_getcon.2 aa_find_mountpoint.2 PODS = $(subst .2,.pod,$(man_MANS)) @@ -20,3 +22,5 @@ BUILT_SOURCES = $(man_MANS) --center="AppArmor" \ --stderr \ $< > $@ + +endif -- 2.1.0 -- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
