dnl Process this file with autoconf to product a configure script.
AC_INIT(client/discuss.c)
AC_CONFIG_HEADER(include/config.h include/usp/usp.h)
AC_PROG_CC
AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_LEX
AC_HEADER_DIRENT
AC_HAVE_HEADERS(unistd.h fcntl.h sysexits.h sys/select.h termios.h)
AC_CHECK_FUNCS(flock)
AC_CHECK_FUNC(connect, true,
	      [AC_CHECK_LIB(socket,socket) AC_CHECK_LIB(nsl,main)])
AC_CHECK_SIZEOF(long, false)
AC_CHECK_SIZEOF(int, false)

AC_SUBST(KLIBS)
AC_SUBST(KDOBJS)
AC_ARG_WITH(krb, [  --with-krb              use kerberos authentication],
	KERBEROS="$withval", KERBEROS="no")
if test "$KERBEROS" = "yes"; then
	AC_DEFINE(KERBEROS)
	KDOBJS="auth_krb.o krb_et.o" KLIBS="$KLIBS -lkrb -ldes"
else
	KDOBJS="auth_weak.o"
fi

AC_SUBST(ZLIBS)
AC_ARG_WITH(zephyr, [  --with-zephyr           server sends zephyr messages],
	ZEPHYR="$withval", ZEPHYR="no")
if test "$ZEPHYR" = "yes"; then
	AC_DEFINE(ZEPHYR)
	ZLIBS="$ZLIBS -lzephyr"
fi

AC_OUTPUT(Makefile client/Makefile dsgrep/Makefile edsc/Makefile include/Makefile include/discuss/Makefile include/usp/Makefile libds/Makefile mclient/Makefile regex/Makefile server/Makefile usp/Makefile)
