dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

dnl Checks for libraries.
AC_PATH_XTRA
CFLAGS="$CFLAGS $X_CFLAGS"
LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
AC_CHECK_LIB(Xext, XextAddDisplay)
AC_CHECK_LIB(Xtst, XTestFakeKeyEvent)

dnl freebsd
AC_CHECK_LIB(util, uu_lock)
AC_SUBST(LIBOBJS)
AC_CHECK_FUNCS(uu_lock, [], [LIBOBJS="$LIBOBJS uucplock.o"])

dnl Checks for header files.
AC_CHECK_HEADERS(fcntl.h paths.h sys/file.h sys/time.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
AC_TYPE_OFF_T
AC_TYPE_UID_T

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(select setreuid)

AC_OUTPUT(Makefile)
