dnl Process this file with autoconf to produce a configure script
AC_INIT(emil.h)
AC_CONFIG_HEADER(config.h)
CC=gcc
dnl AC_PROG_INSTALL
AC_PROG_CC
AC_AIX
AC_GCC_TRADITIONAL
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_RANLIB
AC_DYNIX_SEQ
AC_IRIX_SUN
AC_SCO_INTL
AC_XENIX_DIR
AC_MODE_T
AC_STDC_HEADERS
AC_HAVE_HEADERS(string.h memory.h sysexits.h unistd.h fcntl.h errno.h)
AC_HAVE_HEADERS(sys/errno.h netinet/in.h arpa/nameser.h resolv.h netdb.h)
AC_HAVE_HEADERS(sys/socket.h)
dnl AC_TIME_WITH_SYS_TIME
AC_CHAR_UNSIGNED
AC_CONST
dnl AC_INT_16_BITS
dnl AC_LONG_64_BITS
dnl AC_WORDS_BIGENDIAN
AC_HAVE_LIBRARY(libm.a)
AC_HAVE_LIBRARY(libresolv.a)
AC_HAVE_LIBRARY(libsocket.a)
AC_HAVE_LIBRARY(libnsl.a)
AC_HAVE_FUNCS(getpagesize gethostname res_search)
AC_HEADER_EGREP(strcasecmp,string.h,AC_DEFINE(STRCASECMP_DEFINED))
AC_HEADER_EGREP(strncasecmp,string.h,AC_DEFINE(STRNCASECMP_DEFINED))
AC_HEADER_EGREP(rindex,string.h,AC_DEFINE(RINDEX_DEFINED))
# 
# fnmatch does not work on all systems. This test checks if fnmatch
# is OK else ematch is used.
#
AC_TEST_PROGRAM([
#include <fnmatch.h>
main()
{
	if ((fnmatch("user1@host1", "user2@host2", 0) == FNM_NOMATCH) &&
	    (fnmatch("user1@*", "user1@host2", 0) != FNM_NOMATCH))
		return(0);
	else
		return(1);
}], ,AC_DEFINE(NO_FNMATCH))
AC_OUTPUT(Makefile charset/Makefile)
