From 97745d12bd9e2b7ba4003ae747f3bd1e030ac357 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 8 Dec 2016 09:23:52 +0900 Subject: [PATCH] configure: Moved pandoc check to m4/dovecot.m4 --- configure.ac | 12 +----------- m4/dovecot.m4 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index a42c366393..35d77a120b 100644 --- a/configure.ac +++ b/configure.ac @@ -818,17 +818,7 @@ LDFLAGS="\$(NOPLUGIN_LDFLAGS) $LDFLAGS" AC_SUBST(NOPLUGIN_LDFLAGS) DC_CC_WRAPPER - -AC_ARG_VAR(PANDOC, [Path to pandoc program]) - -# Optional tool for making documentation -AC_CHECK_PROGS(PANDOC, [pandoc], [true]) - -if test "$PANDOC" = "true"; then - if test ! -e README; then - AC_MSG_ERROR([Cannot produce documentation without pandoc]) - fi -fi +DC_PANDOC if test "$docdir" = ""; then dnl docdir supported only by autoconf v2.59c and later diff --git a/m4/dovecot.m4 b/m4/dovecot.m4 index 471fb27d92..5fce9c3bb9 100644 --- a/m4/dovecot.m4 +++ b/m4/dovecot.m4 @@ -169,3 +169,16 @@ EOF fi fi ]) + +AC_DEFUN([DC_PANDOC], [ + AC_ARG_VAR(PANDOC, [Path to pandoc program]) + + # Optional tool for making documentation + AC_CHECK_PROGS(PANDOC, [pandoc], [true]) + + if test "$PANDOC" = "true"; then + if test ! -e README; then + AC_MSG_ERROR([Cannot produce documentation without pandoc - disable with PANDOC=false ./configure]) + fi + fi +]) -- 2.47.3