AC_INIT(telnet.cc)
AC_PREFIX_DEFAULT(/usr/local/v6)

CXXFLAGS="-fpermissive $CXXFLAGS"

AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
INSTALL_LIB="\${INSTALL_DATA}"
AC_SUBST(INSTALL_LIB)
INSTALL_DIR="\${INSTALL} -d"
AC_SUBST(INSTALL_DIR)

AC_CHECK_HEADERS(termcap.h ncurses/termcap.h)
AC_CHECK_LIB(ncurses, main)

CXXFLAGS="-I../libinet6/include $CXXFLAGS"
LIBS="-L../libinet6 -linet6 $LIBS"

AC_OUTPUT(Makefile)
