commit d1fe54e512738aeb82696cd107d720e16ebdbc3e
parent f55e22f529fc0a9c176db912cb6e25526c09efed
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 5 Mar 2014 13:21:11 +0000
configure.ac: add --disable-doc and --disable-examples options
Diffstat:
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
@@ -1,7 +1,10 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = contrib src doc m4 .
+SUBDIRS = contrib src m4 .
EXTRA_DIST = acinclude.m4 libmicrohttpd.pc.in libmicrospdy.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmicrohttpd.pc
+if BUILD_DOC
+SUBDIRS += doc
+endif
diff --git a/configure.ac b/configure.ac
@@ -180,6 +180,18 @@ AM_CONDITIONAL(USE_MS_LIB_TOOL, [test "x$ac_cv_use_ms_lib_tool" = "xyes"])
AM_CONDITIONAL(W32_STATIC_LIB, [test "x$os_is_native_w32" = "xyes" && test "x$enable_static" = "xyes"])
+AC_ARG_ENABLE([[doc]],
+ [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
+ [enable_doc=yes])
+test "x$enable_doc" = "xno" || enable_doc=yes
+AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"])
+
+AC_ARG_ENABLE([[examples]],
+ [AS_HELP_STRING([[--disable-examples]], [do not build any examples])], ,
+ [enable_examples=yes])
+test "x$enable_examples" = "xno" || enable_examples=yes
+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
+
AC_ARG_ENABLE([[epoll]],
[AS_HELP_STRING([[--enable-epoll[=ARG]]], [enable epoll support (yes, no, auto) [auto]])],
[enable_epoll=${enableval}],
@@ -691,6 +703,8 @@ AC_MSG_NOTICE([Configuration Summary:
Postproc: ${enable_postprocessor}
HTTPS support: ${MSG_HTTPS}
epoll support: ${enable_epoll=no}
+ build docs: ${enable_doc}
+ build examples: ${enable_examples}
libmicrospdy: ${enable_spdy}
spdylay (testing): ${have_spdylay}
])
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -20,6 +20,10 @@ endif
SUBDIRS = include platform microhttpd $(microspdy) examples $(curltests) $(zzuftests) .
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
+
EXTRA_DIST = \
datadir/cert-and-key.pem \
datadir/cert-and-key-for-wireshark.pem \