[zbar,3/5] Add --disable-doc configure option to disable building docs

Message ID 1547422709-7111-3-git-send-email-james.hilliard1@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

James Hilliard Jan. 13, 2019, 11:38 p.m. UTC
  From: James Hilliard <james.hilliard1@gmail.com>

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 Makefile.am  |  2 ++
 configure.ac | 10 ++++++++++
 2 files changed, 12 insertions(+)
  

Patch

diff --git a/Makefile.am b/Makefile.am
index df3d79d..b4cae8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,9 @@  if HAVE_NPAPI
 include $(srcdir)/plugin/Makefile.am.inc
 endif
 include $(srcdir)/test/Makefile.am.inc
+if HAVE_DOC
 include $(srcdir)/doc/Makefile.am.inc
+endif
 
 EXTRA_DIST += zbar.ico zbar.nsi
 
diff --git a/configure.ac b/configure.ac
index 6476a20..afccc3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,15 @@  or configure --disable-pthread to skip threaded support.])])
    AC_DEFINE([__USE_UNIX98], [1], [used only for pthread debug attributes])
 ])
 
+dnl doc
+AC_ARG_ENABLE([doc],
+  [AS_HELP_STRING([--disable-doc],
+    [disable building docs])],
+  [],
+  [enable_doc="yes"])
+
+AM_CONDITIONAL([HAVE_DOC], [test "x$enable_doc" != "xno"])
+
 dnl video
 AC_ARG_ENABLE([video],
   [AS_HELP_STRING([--disable-video],
@@ -602,6 +611,7 @@  echo "please verify that the detected configuration matches your expectations:"
 echo "------------------------------------------------------------------------"
 echo "X                 --with-x=$have_x"
 echo "pthreads          --enable-pthread=$enable_pthread"
+echo "doc               --enable-doc=$enable_doc"
 echo "v4l               --enable-video=$enable_video"
 AS_IF([test "x$enable_video" != "xyes"],
   [echo "        => zbarcam video scanner will *NOT* be built"])