AC_INIT(kdb5_edit.c)
CONFIG_RULES
AC_PROG_INSTALL
AC_PROG_YACC
AC_CONST
AC_HEADER_STDC
AC_HAVE_FUNCS(getcwd)
SS_RULES
edit_dbm_done=no
AC_ARG_WITH([kdb4],
[  --with-kdb4		use Kerberos version 4 database library.
  --without-kdb4	Avoid using Kerberos version 4 database library.],
,
withval=no)dnl
if test "$withval" = yes; then
	AC_MSG_RESULT(Using Kerberos version 4 database library)
	USE_KDB4_LIBRARY
	AC_CHECK_LIB(ndbm,main)
	AC_CHECK_LIB(dbm,main)
	edit_dbm_done=yes
else
	AC_DEFINE(KDB4_DISABLE)
fi
AC_ARG_WITH([dbm],
[  --with-dbm		use native dbm for kdc database
  --without-dbm		use included version of Berkeley db (default)],
,
withval=no)dnl
if test "$withval" = yes; then
	AC_MSG_RESULT(Using native dbm)
	if test "$edit_dbm_done" = no; then
		AC_CHECK_LIB(ndbm,main)
		AC_CHECK_LIB(dbm,main)
	fi
else
	AC_MSG_RESULT(Using Berkeley db)
fi
AC_SUBST(DBFLAGS)dnl
dnl
USE_KADM_LIBRARY
USE_KDB5_LIBRARY
USE_KRB4_LIBRARY
USE_SS_LIBRARY
KRB5_LIBRARIES
V5_USE_SHARED_LIB
V5_AC_OUTPUT_MAKEFILE
