# Process this file with autoconf to produce a configure script.
AC_INIT(src/server.cpp)

AM_CONFIG_HEADER(config.h)

# Checks for languages.
AC_LANG_CPLUSPLUS
#AC_LANG(C++)

# Checks for programs.
AC_PROG_CXX
AM_PROG_LIBTOOL

# Checks for libraries.

# Checks for header files.
AC_STDC_HEADERS
AC_CHECK_HEADERS(string cstring)

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

dnl ** Check for inet_pton
AC_MSG_CHECKING(for inet_pton)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>], [inet_pton(0, (char *)0, (char *)0);],
has_inet_pton=yes, has_inet_pton=no)
if test "$has_inet_pton" = yes; then
    AC_MSG_RESULT(yes)
else
    AC_MSG_RESULT(no)
    AC_DEFINE(USE_INET_ATON,,[we can't use inet_pton()])
fi

AM_INIT_AUTOMAKE(libcapsinetwork, 0.3.0)

AC_OUTPUT([
  Makefile
  src/Makefile
])
