3 AC_INIT([ngadmin], [0.1], [admin@darkcoven.tk])
4 AC_CONFIG_MACRO_DIR([.])
5 AC_CONFIG_SRCDIR([raw/src/attr.c])
6 AC_CONFIG_HEADERS([config.h])
20 # enable/disable readline
21 AC_ARG_WITH([readline],
22 [AS_HELP_STRING([--with-readline], [support fancy command line editing @<:@default=check@:>@])],
23 [with_readline="$withval"], [with_readline=check])
25 # enable/disable documentation generation
27 [AS_HELP_STRING([--enable-doc], [enable documentation generation [default=no]])],
28 [enable_doc=yes], [enable_doc=no])
31 if test "x${enable_doc}" = xyes; then
32 AC_CHECK_PROGS([DOXYGEN], [doxygen])
33 if test -z "$DOXYGEN"; then
35 ----------------------------------------
37 ----------------------------------------])
40 AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
44 if test "x${with_readline}" != xno; then
45 AC_CHECK_LIB([readline], [readline], [], [
46 if test "x${with_readline}" = xyes; then
48 ----------------------------------------
49 Unable to find readline library
50 ----------------------------------------])
56 [AS_HELP_STRING([--enable-debug], [enable debug mode [default=no]])],
57 [enable_debug=yes], [enable_debug=no])
59 CFLAGS="-Wall -Wextra -Os"
61 if test "x${enable_debug}" = xyes; then
64 CFLAGS="$CFLAGS -fomit-frame-pointer"
69 # check for header files
70 AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h termios.h unistd.h])
73 # check for typedefs, structures, and compiler characteristics
77 # check for library functions
79 AC_CHECK_FUNCS([inet_ntoa memchr memset select socket strcasecmp strdup strtol strtoul])
99 ${PACKAGE_NAME} version ${PACKAGE_VERSION}
100 Prefix.............: ${prefix}
101 Debug..............: ${enable_debug}
102 Compiler...........: ${CC} ${CFLAGS} ${CPPFLAGS}
103 Readline suppport..: ${with_readline}