dnl $Id: configure.in,v 1.4.4.6 1998/04/29 09:08:00 marc Exp $
dnl
dnl Copyright (c) 1996, Marc Horowitz.  All rights reserved.
dnl See the LICENSE file in the release for redistribution information.

AC_INIT(pksd.c)

AC_PROG_INSTALL
AC_PROG_CC

case "$ac_cv_prog_gcc" in
	yes)
		gcc_cflags="-Wall -pedantic";;
esac
AC_SUBST(gcc_cflags)

dnl the variable is necessary because of the way linux bash (at least)
dnl handles IFS
sendmailpath=/usr/sbin:/usr/lib:/etc
AC_PATH_PROG(SENDMAIL, sendmail, sendmail, $sendmailpath)

AC_CHECK_HEADERS(bstring.h)
AC_CHECK_HEADERS(sys/select.h)

AC_CHECK_FUNCS(mmap madvise)

# If we can't find connect, try looking in -lsocket and -lnsl.  The
# Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
# libsocket.so which has a bad implementation of gethostbyname (it
# only looks in /etc/hosts), so we only look for -lsocket if we need
# it.
AC_FUNC_CHECK(connect, :, [AC_CHECK_LIB(socket, socket)
			   AC_CHECK_LIB(nsl, gethostbyname)])


# yuck. AC_CONFIG_SUBDIRS should use mkdir -p or equivalent
test -d db2-sleepycat || mkdir db2-sleepycat
AC_CONFIG_SUBDIRS(db2-sleepycat/dist)
AC_OUTPUT(Makefile mkpksdconf)
