dnl Process this file with autoconf to produce a configure script.
AC_INIT(sll.h)

dnl AC_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_MAKE_SET

dnl Checks for libraries.

dnl Checks for header files.
dnl AC_HEADER_STDC
AC_STDC_HEADERS
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(string.h fcntl.h memory.h malloc.h unistd.h ctype.h)
AC_CHECK_HEADERS(strings.h)

AC_CHECK_HEADERS(sys/stat.h sys/param.h sys/file.h stdlib.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
AC_CHECK_FUNC(flock,AC_DEFINE(HAVE_FLOCK))
AC_CHECK_FUNC(strcasecmp,AC_DEFINE(HAVE_STRCASECMP))
AC_CHECK_FUNC(mktime,AC_DEFINE(HAVE_MKTIME))
AC_CHECK_FUNC(ftruncate,AC_DEFINE(HAVE_FTRUNCATE))
dnl from vile configure.in, I love vile, a great editor
AC_MSG_CHECKING([for SCO])
AC_PROGRAM_CHECK(COULD_BE_SCO, [scosh], maybe, maybenot)
if test "$COULD_BE_SCO" = "maybe"
then
    AC_DEFINE(SYSTEM_LOOKS_LIKE_SCO)
fi

dnl Checks for library functions.

AC_OUTPUT(Makefile examples/insert/Makefile examples/append/Makefile\
        examples/delete/Makefile examples/append_sorted/Makefile)
