]> git.sur5r.net Git - ngadmin/commitdiff
Add Doxygen documention generation
authordarkcoven <admin@darkcoven.tk>
Fri, 27 Sep 2013 22:43:47 +0000 (00:43 +0200)
committerdarkcoven <admin@darkcoven.tk>
Fri, 27 Sep 2013 22:43:47 +0000 (00:43 +0200)
configure.ac
lib/Makefile.am

index f57c78ecb6078b87a1d3f3631eadda9e65c18685..27ed829b94a3c96ce368e338d4f8237b69bb5fdf 100644 (file)
@@ -17,10 +17,29 @@ LT_PREREQ([2.4])
 LT_INIT
 
 
 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])
 
 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
 CFLAGS="-Wall -Wextra -Os"
 
 # Checks for libraries
@@ -35,15 +54,15 @@ Unable to find readline library
        ])
 fi
 
        ])
 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
 
 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
 
 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])
 
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([inet_ntoa memchr memset select socket strcasecmp strdup strtol strtoul])
 
index 80adeca45fe07b81fb9213f1318cfb1dd679a1f8..3628c132ea2a1a1bda24364ec2256dc4d8cf98bb 100644 (file)
@@ -2,3 +2,17 @@
 SUBDIRS = include src
 
 
 SUBDIRS = include src
 
 
+if HAVE_DOXYGEN
+
+all-local: doc
+
+
+doc:
+       $(DOXYGEN) ngadmin
+
+
+clean-local:
+       rm -rf $(top_builddir)/lib/doc
+
+endif
+