Add conditional generation of Doxygen docs.
[genetic.git] / configure.ac
index d4d776f409dada159878543bc669edc9559248ab..47bcfeb4975c3a0523045b208ae4b431d4ca6c04 100644 (file)
@@ -7,7 +7,16 @@ AC_CONFIG_FILES([
     Makefile
     include/Makefile
     tests/Makefile
+    docs/Makefile
 ])
 
+AC_CHECK_PROGS([DOXYGEN], [doxygen])
+if test -z "$DOXYGEN"; then
+    AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
+fi
+
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
+
 AC_OUTPUT