AC_REVISION($Revision $)
AC_INIT(libconfig, 0.8.10)
AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, true)
AC_AIX

dnl Find out about the host OS (must be done before GET_SHOBJFLAGS)
DC_CHK_OS_INFO

dnl Must be done before checking headers and compiler stuff.
DC_GET_SHOBJFLAGS

AC_HEADER_DIRENT
AC_HEADER_STDC

AC_CHECK_HEADERS(sys/types.h sys/stat.h stdarg.h unistd.h fcntl.h sys/socket.h netinet/in.h arpa/inet.h stdlib.h string.h netdb.h errno.h stdio.h sys/utsname.h ctype.h math.h dirent.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T

dnl Checks for library functions.
AC_CHECK_FUNCS(socket strcspn strdup strstr)
AC_REPLACE_FUNCS(strsep uname)

DC_DO_TYPE(uint64_t, unsigned, 8)
DC_DO_TYPE(int64_t, signed, 8)
DC_DO_TYPE(uint32_t, unsigned, 4)
DC_DO_TYPE(int32_t, signed, 4)
DC_DO_TYPE(uint16_t, unsigned, 2)
DC_DO_TYPE(int16_t, signed, 2)

dnl Checks for Win32 specific things.
DC_DO_NETSET
DC_DO_WIN32

dnl Must be done after modifying LIBOBJS
DC_SYNC_SHLIBOBJS

dnl This must be last.
DC_SETLDRUNPATH($libdir)

AC_OUTPUT(Makefile fopen_net.3 fseek_net.3 lseek_net.3 open_net.3 opennet.3 opennet_init.3 read_net.3)
