Просмотр исходного кода

configure.ac: add --disable-doc and --disable-examples options

Evgeny Grin (Karlson2k) 12 лет назад
Родитель
Сommit
d1fe54e512
3 измененных файлов с 22 добавлено и 1 удалено
  1. 4 1
      Makefile.am
  2. 14 0
      configure.ac
  3. 4 0
      src/Makefile.am

+ 4 - 1
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

+ 14 - 0
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}
 ])

+ 4 - 0
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 \