From: darkcoven Date: Fri, 27 Sep 2013 22:43:47 +0000 (+0200) Subject: Add Doxygen documention generation X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=435f39e395194d9fa12ff7f7c36b67c476091afa;p=ngadmin Add Doxygen documention generation --- diff --git a/configure.ac b/configure.ac index f57c78e..27ed829 100644 --- a/configure.ac +++ b/configure.ac @@ -17,10 +17,29 @@ LT_PREREQ([2.4]) LT_INIT +# enable/disable readline AC_ARG_WITH([readline], [AS_HELP_STRING([--with-readline], [support fancy command line editing @<:@default=check@:>@])], [with_readline="$withval"], [with_readline=check]) +# enable/disable documentation generation +AC_ARG_ENABLE(doc, + [AS_HELP_STRING([--enable-doc], [enable documentation generation [default=no]])], + [enable_doc=yes], [enable_doc=no]) + + +if test "x${enable_doc}" = xyes; then + AC_CHECK_PROGS([DOXYGEN], [doxygen]) + if test -z "$DOXYGEN"; then + AC_MSG_ERROR([ +---------------------------------------- +Doxygen not found +----------------------------------------]) + fi +fi +AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) + + CFLAGS="-Wall -Wextra -Os" # Checks for libraries @@ -35,15 +54,15 @@ Unable to find readline library ]) fi -# Checks for header files +# check for header files AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h termios.h unistd.h]) AC_HEADER_STDBOOL -# Checks for typedefs, structures, and compiler characteristics +# check for typedefs, structures, and compiler characteristics AC_C_INLINE AC_TYPE_SIZE_T -# Checks for library functions +# check for library functions AC_FUNC_MALLOC AC_CHECK_FUNCS([inet_ntoa memchr memset select socket strcasecmp strdup strtol strtoul]) diff --git a/lib/Makefile.am b/lib/Makefile.am index 80adeca..3628c13 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,3 +2,17 @@ SUBDIRS = include src +if HAVE_DOXYGEN + +all-local: doc + + +doc: + $(DOXYGEN) ngadmin + + +clean-local: + rm -rf $(top_builddir)/lib/doc + +endif +