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

dnl Checks for programs.
AC_PROG_LN_S
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PATH_PROGS(PERL, perl perl4 perl5)

AC_MSG_CHECKING(if --enable-purify is specified)
AC_SUBST(PURIFY)
PURIFY=
AC_ARG_ENABLE(purify,
	[ --enable-purify          enables checks by purify],
	[AC_MSG_RESULT(yes)
	AC_PATH_PROGS(PURIFY, purify, "")
	if test "$PURIFY" != ""; then
		PURIFY="$PURIFY purecov"
	fi],
	[AC_MSG_RESULT(no)])

dnl Checks for libraries.
AC_DEFINE(UNIX)
AC_DEFINE(TERMCAP)
AC_CHECK_LIB(terminfo, tgetstr,, [AC_CHECK_LIB(termcap, tgetstr,, [AC_CHECK_LIB(ncurses, tgetstr)])])

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h termio.h unistd.h termios.h)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_CHECK_FUNCS(sigvec tgetnum)
AC_FUNC_GETPGRP
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL

dnl AC_OUTPUT(Makefile src/Makefile)
AC_OUTPUT(Makefile)
