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])
30 # enable/disable build of NgSpy
32 [AS_HELP_STRING([--enable-spy], [enable NgSpy [default=no]])],
33 [enable_spy=yes], [enable_spy=no])
34 AM_CONDITIONAL(ENABLE_SPY, test x$enable_spy = xyes)
38 if test "x${enable_doc}" = xyes; then
39 AC_CHECK_PROGS([DOXYGEN], [doxygen])
40 if test -z "$DOXYGEN"; then
42 ----------------------------------------
44 ----------------------------------------])
47 AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
51 if test "x${with_readline}" != xno; then
52 AC_CHECK_LIB([readline], [readline], [], [
53 if test "x${with_readline}" = xyes; then
55 ----------------------------------------
56 Unable to find readline library
57 ----------------------------------------])
63 [AS_HELP_STRING([--enable-debug], [enable debug mode [default=no]])],
64 [enable_debug=yes], [enable_debug=no])
66 CFLAGS="-Wall -Wextra -Os"
68 if test "x${enable_debug}" = xyes; then
71 CFLAGS="$CFLAGS -fomit-frame-pointer"
76 # check for header files
77 AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h termios.h unistd.h])
80 # check for typedefs, structures, and compiler characteristics
84 # check for library functions
86 AC_CHECK_FUNCS([inet_ntoa memchr memset select socket strcasecmp strdup strtol strtoul])
102 AM_COND_IF([ENABLE_SPY], [
115 ${PACKAGE_NAME} version ${PACKAGE_VERSION}
116 Prefix.............: ${prefix}
117 Debug..............: ${enable_debug}
118 Compiler...........: ${CC} ${CFLAGS} ${CPPFLAGS}
119 Readline suppport..: ${with_readline}
120 Spy................: ${enable_spy}