AC_INIT(error_table.y)
CONFIG_RULES
AC_CONST
AC_PROG_LEX
AC_PROG_YACC
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_ARCHIVE
AC_PROG_RANLIB
HAVE_YYLINENO
DECLARE_SYS_ERRLIST
dnl
dnl Fancy caching of perror result...
AC_MSG_CHECKING(for perror declaration)
AC_CACHE_VAL(krb5_cv_decl_perror,
[AC_HEADER_EGREP(perror, errno.h, 
  krb5_cv_decl_perror=yes, krb5_cv_decl_perror=no)])dnl
AC_MSG_RESULT($krb5_cv_decl_perror)
if test $krb5_cv_decl_perror = yes; then
	AC_DEFINE(HDR_HAS_PERROR)
fi
dnl
AC_FUNC_CHECK(strerror,AC_DEFINE(HAS_STRERROR))
AC_CHECK_HEADERS(stdarg.h)
AC_HAVE_HEADERS(stdlib.h)
CopySrcHeader(com_err.h,$(BUILDTOP)/include)
V5_SHARED_LIB_OBJS
V5_MAKE_SHARED_LIB(libcom_err)
AC_ARG_ENABLE([shared],
[  --enable-shared         build shared libraries],[
LinkFileDir([$](TOPLIBD)/libcom_err.[$](SHEXT), libcom_err.[$](SHEXT), ../util/et)
AppendRule([all -unix:: [$](TOPLIBD)/libcom_err.$(SHEXT)])
AppendRule([install::	libcom_err.[$](SHEXT)
	[$](INSTALL_DATA) libcom_err.[$](SHEXT)	\
		[$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)libcom_err.[$](SHEXT)])
])dnl
if test -n "$krb5_cv_staticlibs_enabled" ; then
        AppendRule([install:: libcom_err.[$](STEXT)
	[$](INSTALL_DATA) libcom_err.[$](STEXT) [$](DESTDIR)[$](KRB5_LIBDIR)[$](S)libcom_err.[$](STEXT)])
        LinkFileDir([$](TOPLIBD)/libcom_err.[$](STEXT),libcom_err.[$](STEXT),../util/et)
        AppendRule([all:: [$](TOPLIBD)/libcom_err.[$](STEXT)])
fi
V5_AC_OUTPUT_MAKEFILE
