AC_INIT(napLib/md5.h)
AM_INIT_AUTOMAKE(tknap, 0.4.37)
AM_CONFIG_HEADER(config.h)

dnl Sets platform-specific options based on 'tclConfig.sh'
MP_CONFIG_TCL

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)

dnl Checks for typedefs, structures and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(int)
AC_STRUCT_ST_BLKSIZE
if test $ac_cv_struct_st_blksize = yes; then
 MP_GET_BLKSIZE
else
 mp_cv_var_st_blksize=4096
fi
AC_DEFINE_UNQUOTED(MD5_BLKSIZE, $mp_cv_var_st_blksize, [File I/O block size])

dnl Checks for library functions.
AC_CHECK_FUNCS(memcpy)

dnl Gets version numbers
.. ${srcdir}/versions
AC_SUBST(TKNAP_VERSION)
AC_SUBST(MPTK_VERSION)
AC_SUBST(NAPLIB_VERSION)
AC_DEFINE_UNQUOTED(NAPLIB_VERSION, "$NAPLIB_VERSION", [napLib version])

AC_OUTPUT(mpTk/Makefile napLib/Makefile napLib/images/Makefile \
    Makefile napLib/init.tcl napLib/pkgIndex.tcl tknap napchat.tcl)
.
