AC_REVISION($Revision $)
AC_INIT(htp, 0.3.20)
AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX
AC_GNU_SOURCE

dnl Do host stuff first so we can ensure that if it changes our CFLAGS/CPPFLAGS
dnl we still work!
DC_CHK_OS_INFO

AC_CHECK_HEADERS(netdb.h netinet/in.h stdio.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h time.h unistd.h syslog.h math.h)
AC_HEADER_TIME

AC_REPLACE_FUNCS(getopt gettimeofday settimeofday)
AC_CHECK_FUNCS(adjtime openlog syslog setsid fork)

dnl Network libs
DC_DO_NETWORK

dnl Checks for Win32 specific things.
DC_DO_WIN32

dnl Check for libconfig
DC_ASK_OPTLIB(config, lc_process, libconfig.h, [       Process configuration files using libconfig], libconfig, HAVE_LIBCONFIG, HAVE_LIBCONFIG_H, [
	AC_MSG_ERROR([Libconfig is required.  http://www.rkeene.org/oss/libconfig/])
])

AC_OUTPUT(Makefile htpd.8 htpdate.8 htpd.conf.5)
