]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Moved pandoc check to m4/dovecot.m4
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 8 Dec 2016 00:23:52 +0000 (09:23 +0900)
committerGitLab <gitlab@git.dovecot.net>
Thu, 8 Dec 2016 17:51:38 +0000 (19:51 +0200)
configure.ac
m4/dovecot.m4

index a42c36639378ffe1258a3913443b18cf93fb85d1..35d77a120bbf44f2b656b50e77d5625245bf7b69 100644 (file)
@@ -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
index 471fb27d9270e5addd5cf83cb4348454397a11ab..5fce9c3bb9512624dbbe7004185c7e5b178073a2 100644 (file)
@@ -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
+])