dnl Process this file with autoconf to produce a configure script.
AC_INIT(tcpd.c)
AC_PREFIX_DEFAULT(/usr/local/v6)

AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_INSTALL
INSTALL_LIB="\${INSTALL_DATA}"
AC_SUBST(INSTALL_LIB)
INSTALL_DIR="\${INSTALL} -d"
AC_SUBST(INSTALL_DIR)

dnl Checks for libraries.
dnl Replace `main' with a function in -ldbm:
AC_CHECK_LIB(dbm, main)
dnl Replace `main' with a function in -lnsl:
AC_CHECK_LIB(nsl, main)
dnl Replace `main' with a function in -lresolv:
AC_CHECK_LIB(resolv, main)
dnl Replace `main' with a function in -lrpc:
AC_CHECK_LIB(rpc, main)
dnl Replace `main' with a function in -lrpcsvc:
AC_CHECK_LIB(rpcsvc, main)
dnl Replace `main' with a function in -lyp:
AC_CHECK_LIB(yp, main)

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

AC_OUTPUT(Makefile)
