Add Doxygen support to build system to build the API doc
[babeltrace.git] / configure.ac
index 1c49db8152092247c7010dd09580c4a05f9961c7..bc7df06811e4427ab587cbcaf635917fd23c1ce5 100644 (file)
@@ -349,6 +349,32 @@ AC_SUBST(babeltracectfirincludedir)
 babeltracepluginincludedir="${includedir}/babeltrace/plugin"
 AC_SUBST(babeltracepluginincludedir)
 
+# check for Doxygen
+AC_ARG_ENABLE(
+  [api-doc],
+  [AC_HELP_STRING(
+    [--enable-api-doc],
+    [generate and install HTML API documentation]
+  )],
+  [enable_api_doc=$enableval],
+  [enable_api_doc=no]
+)
+AM_CONDITIONAL([ENABLE_API_DOC], [test "x$enable_api_doc" = "xyes"])
+
+AS_IF([test "x$enable_api_doc" = "xyes"], [
+  DX_DOXYGEN_FEATURE(ON)
+  DX_DOT_FEATURE(OFF)
+  DX_HTML_FEATURE(ON)
+  DX_CHM_FEATURE(OFF)
+  DX_CHI_FEATURE(OFF)
+  DX_MAN_FEATURE(OFF)
+  DX_RTF_FEATURE(OFF)
+  DX_XML_FEATURE(OFF)
+  DX_PDF_FEATURE(OFF)
+  DX_PS_FEATURE(OFF)
+  DX_INIT_DOXYGEN([Babeltrace], [$(srcdir)/Doxyfile], [output])
+])
+
 AC_CONFIG_FILES([
        Makefile
        types/Makefile
@@ -366,6 +392,8 @@ AC_CONFIG_FILES([
        formats/ctf/ir/Makefile
        converter/Makefile
        doc/Makefile
+        doc/api/Makefile
+        doc/api/Doxyfile
        doc/bindings/Makefile
        doc/bindings/python/Makefile
        doc/images/Makefile
@@ -440,6 +468,10 @@ done
 ]
 PPRINT_PROP_STRING([Target architecture], $target_arch)
 
+# API doc
+test "x$enable_api_doc" = "xyes" && value=1 || value=0
+PPRINT_PROP_BOOL([HTML API documentation], $value)
+
 # python bindings enabled/disabled
 test "x$enable_python" = "xyes" && value=1 || value=0
 PPRINT_PROP_BOOL([Python bindings], $value)
This page took 0.023646 seconds and 4 git commands to generate.