Code

Merge remote branches 'jn/cosmetics', 'jn/doxygen' and 'jn/renames'
[ncmpc.git] / configure.ac
index 22875e4ca1243697dce9b3791f13729a8ed57a57..19b8ba10a8ccc7d215030dfab4124f3c60981c4e 100644 (file)
@@ -357,6 +357,24 @@ AC_ARG_ENABLE(test,
 
 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
 
+dnl
+dnl autogenerated documentation
+dnl
+
+AC_ARG_ENABLE(documentation,
+       AS_HELP_STRING([--enable-documentation],
+               [build doxygen documentation @<:@default=no@:>@]),,
+       enable_documentation=no)
+
+if test x$enable_documentation = xyes; then
+       AC_PATH_PROG(DOXYGEN, doxygen)
+       if test x$DOXYGEN = x; then
+               AC_MSG_ERROR([doxygen not found])
+       fi
+       AC_SUBST(DOXYGEN)
+fi
+
+AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
 
 dnl
 dnl CFLAGS
@@ -380,4 +398,4 @@ dnl Generate output files
 dnl
 
 AC_CONFIG_FILES([Makefile po/Makefile.in po/Makefile])
-AC_OUTPUT
+AC_OUTPUT(doc/doxygen.conf)